framework-runtime
Routes DI-engine task/middleware, Parallel, Supervisor, and modern example workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- framework-runtime
- license
- Apache 2.0
- metadata
- { "disco-role": "operating", "disable-model-invocation": true }
- description
- Routes DI-engine task/middleware, Parallel, Supervisor, and modern example workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md2.6 KB
- 参考文档references/troubleshooting.md1.4 KB
- 参考文档references/workflows.md2.1 KB
- 脚本scripts/parallel_smoke.py781 B
- 脚本scripts/task_smoke.py694 B
03 SKILL.md 正文
Framework runtime
Use this sub-skill for the task/middleware runtime and the modern example recipes that build on it. These workflows are more composable than the legacy serial pipeline family and are the best fit for multi-process message routing.
Owns
ding.framework.task,Task,Context,OnlineRLContext,OfflineRLContext, and the task event helpersParallel.runnerand theParallelmessage-routing APISupervisor,ChildType, and env/process supervision helpers- middleware-based example scripts in
ding/example/ - runtime helpers such as
task.use,task.forward,task.backward,task.wait_for,task.emit, andtask.run
Does not own
- CLI/config parsing and config compilation; those live in
cli-config - Legacy
serial_pipelineand data-collection helpers; those live inserial-pipelines - Env-wrapper shape debugging; those live in
env-integration
Read this first when the user asks
- how to write or debug a
task.start(...)workflow - how the repo's modern
ding/example/*.pyscripts are structured - how to use
Parallel.runneror recover from multi-process routing failures - how
SupervisororEnvSupervisorstyle child management works - how to build a custom middleware chain for off-policy, on-policy, offline, or self-play-style workflows
Workflow
- Start with
references/workflows.mdto choose the right runtime shape. - Read
references/api-reference.mdfor the relevant signatures and routing parameters. - Use the bundled smoke scripts when you need a small reproducible check that the installed environment still supports the task or parallel runtime.
- Send env-shape or config-shape problems to the neighboring sub-skill rather than bloating the runtime section.
Common decision points
- Use
task.start(async_mode=False)for the simplest single-process workflow. - Use
task.start(async_mode=True)when the runtime must yield and resume between middleware steps. - Use
Parallel.runnerwhen the recipe needs multiple workers or router-aware cross-process messaging. - Use
Supervisorwhen the workflow needs to manage child envs/processes with explicit restart/timeout behavior.
Helpful bundle links
references/workflows.mdfor the example-family map.references/api-reference.mdfor signatures and parameter meanings.references/troubleshooting.mdfor process, routing, and message-queue failures.scripts/task_smoke.pyandscripts/parallel_smoke.pyfor safe runtime checks.
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).