workflow-orchestration
Use FedML workflow DAGs, Job subclasses, WorkflowMLOpsApi, and train/deploy/inference job wrappers to orchestrate dependent jobs.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- workflow-orchestration
- license
- Apache 2.0
- metadata
- { "disco-role": "operating", "parent_skill": "fedml" }
- description
- Use FedML workflow DAGs, Job subclasses, WorkflowMLOpsApi, and train/deploy/inference job wrappers to orchestrate dependent jobs.
- disable-model-invocation
- true
02 资源文件 1
- 脚本scripts/local_workflow_smoke.py2.4 KB
03 SKILL.md 正文
FedML Workflow Orchestration
Use this sub-skill for fedml.workflow DAGs, custom Job subclasses, Workflow.add_job, workflow status/output inspection, and customized job wrappers such as TrainJob, ModelDeployJob, and ModelInferenceJob.
Do not use this for
- A single
fedml launch job.yamlwithout dependencies: use../launch-and-packaging/SKILL.md. - Plain model card deployment without a workflow DAG: use
../model-serving/SKILL.md. - Training-loop internals: use
../distributed-training/SKILL.md.
Local DAG smoke
For offline structural validation, use custom Job subclasses and run the bundled helper from the root skill directory:
python sub-skills/workflow-orchestration/scripts/local_workflow_smoke.py
The helper avoids backend workflow creation and remote launch side effects. It validates job dependencies, inputs/outputs, and status transitions.
Core local pattern
from fedml.workflow import Job, JobStatus, Workflow
class LocalJob(Job):
def run(self):
self.output_data_dict = {"ok": True, "inputs": self.input_data_dict}
def status(self):
return JobStatus.FINISHED
def kill(self):
pass
workflow = Workflow("demo")
a = LocalJob("prepare")
b = LocalJob("consume")
workflow.add_job(a)
workflow.add_job(b, dependencies=[a])
For fully offline tests, avoid Workflow.run() unless backend update calls are mocked. The bundled smoke manually computes metadata and executes a dependency-safe local path.
Remote workflow path
Real workflow runs and customized jobs may call backend APIs, upload/download inputs/outputs, and launch jobs. Before using them, confirm:
- API key and backend version.
- The workflow type and name.
- Job YAML paths for
TrainJobor deploy/inference wrappers. - Remote side effects and resource usage are allowed.
- Output storage and cleanup expectations.
Relevant classes:
Workflow(name, loop=False, api_key=None, workflow_type=...)Workflow.add_job(job, dependencies=None)Workflow.run()WorkflowMLOpsApiJobandJobStatusTrainJob,ModelDeployJob,ModelInferenceJob
Evidence anchors
python/fedml/workflow/workflow.py— workflow graph and execution order.python/fedml/workflow/jobs.py—Job/JobStatuscontracts.python/fedml/workflow/workflow_mlops_api.py— backend workflow APIs.python/fedml/workflow/customized_jobs/— train/deploy/inference wrappers.python/fedml/workflow/driver_example/— remote workflow example.
Cautions
Workflow.add_jobrejects non-Jobobjects and duplicate names.- Cycles fail when topological order is computed.
Workflow.run()updates backend workflow status, so it is not purely offline.- Customized jobs encode inputs, launch job YAMLs, and move outputs through FedML storage; they need credentials.
Exit criteria
A workflow-orchestration task is complete when the DAG shape, job dependencies, local-vs-remote execution path, credentials, and output handoff are explicit, and local smoke or remote workflow status is recorded.
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).