pipeline-authoring
Author Kubeflow Pipelines DSL components, pipelines, artifacts, task modifiers, control flow, and local execution smoke checks.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
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 资源文件 5
- 参考文档references/api-reference.md10.0 KB
- 参考文档references/local-execution.md7.0 KB
- 参考文档references/troubleshooting.md9.2 KB
- 参考文档references/workflows.md8.0 KB
- 脚本scripts/compile_minimal_pipeline.py4.2 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
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).