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 從公開儲存庫中收錄這些內容。

檢舉或申請下架