Domino Flows

作者 dominodatalabd86698d74d56无许可证7 个星标收录于 2026年10月8日更新于 2026年10月8日仓库2天前更新

Orchestrate multi-step ML workflows using Domino Flows (built on Flyte). Define DAGs with typed inputs/outputs, heterogeneous environments, automatic lineage, and reproducibility. Use when building data pipelines, multi-stage training workflows, or processes requiring orchestration and monitoring.

AI 生成的概览

指导在 Flyte 上用 Domino Flows 以 DAG 构建多步骤机器学习工作流,包含类型化任务与阶段脚本。

功能
该技能提供使用 Domino Flows(基于 Flyte 构建)编排多步骤机器学习工作流的参考知识。它讲解 DAG 概念、类型化输入输出、按任务划分的环境、血缘追踪与可复现性,并演示如何在 workflow 中用 DominoJobTask 与 DominoJobConfig 定义任务。它还说明阶段脚本模式,即从工作流输入读取并写入工作流输出,以及如何远程运行流程。它产出的是指导与代码模式,而非可执行产物。
适用场景
适用于构建数据管道、多阶段训练工作流,或需要编排、监控、血缘与可复现性的 ETL 流程。也适用于任务需在不同环境中运行或被调度触发的场景。不适用于单步骤流程、实时推理或共享可变状态的任务。
运行要求
需要了解 Domino Flows 与 Flyte,安装 flytekit 和 flytekitplugins.domino.task Python 包,具备可远程执行作业的 Domino 环境,并能访问代码仓库以提交和推送代码。该技能不附带脚本,仅为说明与参考文档。

Domino Flows Skill

This skill provides comprehensive knowledge for orchestrating ML workflows using Domino Flows, built on the Flyte platform.

Key Concepts

What are Domino Flows?

Domino Flows enable:

  • DAG-based orchestration: Define workflows as directed acyclic graphs
  • Typed interfaces: Strong typing for inputs and outputs
  • Heterogeneous environments: Different environments per task
  • Automatic lineage: Track data and model provenance
  • Reproducibility: Version-controlled workflows
  • Scalability: Distributed execution across compute resources

Core Components

ComponentDescription
TaskSingle unit of work (runs as a Domino Job)
WorkflowDAG connecting tasks
ArtifactTyped input/output passed between tasks
Launch PlanConfigured workflow execution

Related Documentation

  • FLOW-BASICS.md - DAG concepts, task definitions
  • EXAMPLES.md - Common flow patterns

Quick Start

⚠️ Critical: Domino Flows does NOT support native Flyte @task decorators. Tasks must use DominoJobTask + DominoJobConfig. Only @workflow is unchanged.

Basic Flow

Each task runs as a Domino Job. Stage scripts read from /workflow/inputs/<name> and write to /workflow/outputs/o0. Pass PYTHONPATH=/mnt/code in the command.

python
from flytekit import workflowfrom flytekitplugins.domino.task import DominoJobConfig, DominoJobTask
preprocess_task = DominoJobTask(    name="Preprocess Data",    domino_job_config=DominoJobConfig(        Command="bash -c 'PYTHONPATH=/mnt/code python /mnt/code/stages/preprocess.py'",    ),    inputs={"input_path": str},    outputs={"o0": str},    use_latest=True,)
train_task = DominoJobTask(    name="Train Model",    domino_job_config=DominoJobConfig(        Command="bash -c 'PYTHONPATH=/mnt/code python /mnt/code/stages/train.py'",    ),    inputs={"preprocess_output": str},    outputs={"o0": str},    use_latest=True,)
@workflowdef training_pipeline(input_path: str = "/mnt/data/raw.csv") -> str:    preprocess_output = preprocess_task(input_path=input_path)    result = train_task(preprocess_output=preprocess_output)    return result

Stage Script Pattern

python
# stages/preprocess.pyimport json, os
INPUTS, OUTPUTS = "/workflow/inputs", "/workflow/outputs"
def main():    input_path = open(f"{INPUTS}/input_path").read().strip()    # ... do work ...    os.makedirs(OUTPUTS, exist_ok=True)    with open(f"{OUTPUTS}/o0", "w") as f:        f.write(json.dumps({"output_path": "/mnt/artifacts/processed.parquet"}))
if __name__ == "__main__":    main()

Running the Flow

bash
# Always commit and push first — jobs run against remote repo stategit add -A && git commit -m "..." && git push
# Trigger remotelyPYTHONPATH=/mnt/code pyflyte run --remote \    my_flow.py training_pipeline \    --input_path "/mnt/data/raw.csv"

When to Use Flows

Good Use Cases

  • Data processing → Model training pipelines
  • ETL with ML steps
  • Multi-stage training with different environments
  • Processes requiring reproducibility and lineage
  • Scheduled/triggered workflows

Not Ideal For

  • Single dataset with many small computations
  • Tasks that write to mutable shared state
  • Simple single-step processes
  • Real-time inference (use Model APIs instead)

Documentation Links

来源与署名

来源:dominodatalab/domino-claude-plugin位于skills/flows提交d86698d

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架