flow-orchestration
Guides LazyLLM pipeline, parallel, branching, looping, binding, graph, and traceable flow orchestration workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- flow-orchestration
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guides LazyLLM pipeline, parallel, branching, looping, binding, graph, and traceable flow orchestration workflows.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/flow-recipes.md2.7 KB
- 参考文档references/troubleshooting.md1.9 KB
- 脚本scripts/flow_smoke.py2.2 KB
03 SKILL.md 正文
LazyLLM Flow Orchestration
Use this sub-skill when a task asks how to compose LazyLLM flows with pipeline, parallel, diverter, switch, ifs, loop, warp, barrier, bind, nested contexts, or traceable graph execution.
Start here when
- The user wants to turn Python functions, model modules, RAG retrievers, or agents into a LazyLLM workflow.
- A flow returns an unexpected tuple/list/dict shape.
- The task mentions
_skip_items,_kept_items,_scatter,_concurrent,bind,pipeline()context managers, nested subflows, or conditional/loop execution. - You need to replace model/RAG/agent nodes with deterministic callables before debugging orchestration.
Files to read
- flow-recipes.md for concise recipes and common shape semantics.
- troubleshooting.md for output-shape, binding, and backend debugging failures.
- scripts/flow_smoke.py for a safe Python-callable flow smoke test.
Safe flow-building sequence
- Sketch the data shape at each node before adding LazyLLM primitives.
- Prototype with deterministic Python callables rather than models/providers.
- Choose the primitive.
pipeline: sequential composition.parallel: same input through multiple stages; can return tuples and skip/keep items.diverter: distribute positional/list/tuple/dict inputs to separate functions.switch/ifs: conditional routing.loop: repeated execution with count or stop condition.bind: bind flow inputs or prior stage outputs into callable parameters.
- Run
scripts/flow_smoke.pyto confirm the environment and expected semantics. - Swap in heavy nodes last and route their setup to model-deployment, RAG, agents-tools, or writer-review.
Verified examples from tests
pipeline(add_one, add_one)(1) == 3.- Context manager pipelines can name stages and bind the original input or previous outputs into later stages.
parallel(add_one, add_one)(1) == (2, 2)._skip_itemsand_kept_itemsselect by index or by named stage, but cannot be provided together.switchsupports predicate-to-action maps, default cases, conversion functions, and full-input judging.ifssupports booleans and callable conditions and propagates real condition exceptions.loopsupports fixed counts, stop conditions, and runtime limit expansion.
Cross-sub-skill links
- Use model-deployment when a flow node calls
OnlineModule,TrainableModule, orServerModule. - Use rag-document-processing when a flow node ingests documents, retrieves nodes, or reranks contexts.
- Use agents-tools when a flow node is a tool manager or agent.
- Use writer-review when flow output is a writer artifact or review command plan.
Handoff checklist
When you finish a flow task, provide:
- primitive choice and why,
- input/output shape for each stage,
- minimal deterministic smoke result,
- where model/RAG/agent/writer nodes are configured,
- any concurrency/multiprocessing or side-effect warnings.
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).