pipeline-authoring
Author Kubeflow Pipelines DSL components, pipelines, artifacts, task modifiers, control flow, and local execution smoke checks.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- pipeline-authoring
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Author Kubeflow Pipelines DSL components, pipelines, artifacts, task modifiers, control flow, and local execution smoke checks.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md10.0 KB
- 参考文档references/local-execution.md7.0 KB
- 参考文档references/troubleshooting.md9.2 KB
- 参考文档references/workflows.md8.0 KB
03 SKILL.md 正文
Pipeline Authoring
Use this sub-skill when the task is to write, repair, or locally smoke-check Kubeflow Pipelines (KFP) v2 Python DSL code: @dsl.component, @dsl.container_component, @dsl.pipeline, artifact/parameter typing, task dependencies/modifiers, control flow, and KFP local execution.
Route first
Handle here:
- Creating or fixing Python-function components with
@dsl.component. - Creating or fixing command/image components with
@dsl.container_componentanddsl.ContainerSpec. - Composing tasks with
@dsl.pipeline, task outputs,.after(), retries, caching, display names, env vars, and basic CPU/memory/accelerator modifiers. - Using KFP artifact classes and annotations:
dsl.Input,dsl.Output,dsl.InputPath,dsl.OutputPath,dsl.Artifact,dsl.Dataset,dsl.Model,dsl.Metrics, anddsl.ClassificationMetrics. - Using authoring-level control flow such as
dsl.If/dsl.Elif/dsl.Else, legacydsl.Condition,dsl.ParallelFor,dsl.ExitHandler, anddsl.OneOf. - Choosing and debugging
kfp.localrunners for compile-adjacent local execution smoke tests.
Route away:
- Compile flags, CLI compilation behavior, compiler output shape, PipelineSpec YAML inspection, and Kubernetes manifest output: use
compiler-and-cli. - Live
kfp.Clientruns, uploads, experiments, schedules, wait/list/get/delete workflows, or Registry operations: useclient-and-registry. - Kubernetes-specific helper APIs such as secrets, ConfigMaps, PVCs, pod labels/annotations, tolerations, affinity, image pull secrets, and security context: use
kubernetes-platform. - Editing this repository, generated code, frontend/backend, maintainer tests, CI, release, or source-checkout policy: use
repo-development.
Operating procedure
- Identify whether the user is authoring a Python component, a container component, or the pipeline graph. If the request is mostly about compile/run/upload tooling, route before drafting code.
- Load the smallest needed reference:
references/api-reference.mdfor signatures, accepted types, and task modifier behavior.references/workflows.mdfor concise authoring recipes and examples.references/local-execution.mdforkfp.localrunner setup and local-only caveats.references/troubleshooting.mdfor symptom-to-fix guidance.
- Prefer explicit type annotations. Treat missing annotations, ambiguous artifact/parameter wiring, and multiple-output access as first-class bugs.
- Keep component body imports self-contained. Imports needed only to define the pipeline stay outside component bodies; imports needed at task runtime go inside the component function or into the runtime image/package list.
- For artifact IO, wire producer task outputs to consumers by output key. Use
task.outputonly when the task has exactly one output. - For local smoke checks, initialize
kfp.localbefore calling components or pipelines as Python functions. Use the bundledscripts/compile_minimal_pipeline.pyonly as an authoring sanity check; route custom compile options tocompiler-and-cli.
Safety and verification
- Do not assume a Kubernetes cluster or KFP deployment is available for this sub-skill.
- Do not require the original source checkout, samples, or tests at runtime. Use only the installed
kfppackage and bundled files in this skill tree. - When giving code, include the imports and component annotations needed to run or compile it from a standalone Python file.
- When suggesting local execution, state runner prerequisites and whether the flow uses lightweight Python components or container components.
- If the user asks to inspect generated YAML fields or compile with specific flags, stop authoring and route to
compiler-and-cli.
Quick smoke helper
From this sub-skill directory, a safe package-level compile smoke check is available:
python scripts/compile_minimal_pipeline.py --output /tmp/kfp-authoring-smoke.yaml
It compiles a tiny self-contained pipeline that exercises parameters, artifacts, task modifiers, control flow, and a container component. It does not contact a cluster and does not read any original repository files.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.