pipes-external-processes
Integrate Python and non-Python external processes with Dagster using dagster-pipes, open_dagster_pipes, PipesSubprocessClient, loaders, message writers, logs, materializations, checks, and custom messages.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- pipes-external-processes
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Integrate Python and non-Python external processes with Dagster using dagster-pipes, open_dagster_pipes, PipesSubprocessClient, loaders, message writers, logs, materializations, checks, and custom messages.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md9.0 KB
- 参考文档references/troubleshooting.md9.1 KB
- 参考文档references/workflows.md8.5 KB
- 脚本scripts/pipes_external_smoke.py3.0 KB
03 SKILL.md 正文
Pipes External Processes
Use this sub-skill when external Python scripts, non-Python executables, notebooks, Spark jobs, or service-launched processes need to communicate back to Dagster through the Dagster Pipes protocol.
Route Here
- Retrofitting external code to call
dagster_pipes.open_dagster_pipes()and emit messages without importingdagster. - Launching a local subprocess from a Dagster asset with
dagster.PipesSubprocessClientand returningget_materialize_result(),get_results(),get_asset_check_result(), orget_custom_messages(). - Choosing context and message transport pieces such as env vars vs CLI args, default file/stdout writers, temp-file readers, and blob-store writers.
- Reporting external logs, asset materializations, asset checks, custom messages, rich metadata dictionaries, partition context, run metadata, and extras.
- Debugging missing
DAGSTER_PIPES_*bootstrap params, loader mismatches, duplicate materialization messages, closed contexts, or optional cloud transport dependencies.
Route Elsewhere
- Designing the Dagster asset graph,
@asset,@multi_asset,@asset_check,Definitions, and asset selections: use../asset-definitions/SKILL.md. - Resource/config/secret modeling around subprocess credentials and environment variables: use
../configuration-resources/SKILL.md. - Dagster CLI execution,
dagster dev,dg, project scaffolding, and code-location validation: use../cli-local-development/SKILL.md. - Service-specific Pipes clients for Databricks, AWS, GCP, Kubernetes, or Spark libraries: use their integration-specific skill if present; otherwise treat this sub-skill as the generic protocol foundation only.
Start Here
- Read
references/workflows.mdfor subprocess integration, external script retrofits, non-Python message emission, custom messages, and loader/writer choices. - Read
references/api-reference.mdfor publicdagster_pipesanddagsterPipes APIs, message payload shapes, and metadata formats. - Read
references/troubleshooting.mdfor import failures, optional dependencies, missing bootstrap params, CLI/API misuse, and protocol-specific failures. - Run
python scripts/pipes_external_smoke.py --helpfrom this sub-skill directory, orpython scripts/pipes_external_smoke.py --inactive-demo, to verify safe external-side behavior without launching Dagster.
Fast Triage
- External code should usually import only
dagster_pipes, notdagster; Dagster-side asset code importsdagster as dg. open_dagster_pipes()defaults to env-var params, default context loading, and default message writing; usePipesCliArgsParamsLoader()when the launcher passes--dagster-pipes-contextand--dagster-pipes-messages.- Return or yield the completed invocation results on the Dagster side; otherwise Pipes messages may be received but never surfaced as Dagster events.
- For multi-assets, pass
asset_key=explicitly and materialize each asset key at most once in a single Pipes invocation. - Cloud/blob writers and loaders are optional patterns; do not assume S3, GCS, Azure, DBFS, Spark, or Databricks packages are installed unless the user environment proves them.
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).