liveBook · Manning

Directed acyclic graph

As explained in Distributed Machine Learning Patterns

A directed acyclic graph is a directed graph with no path that returns to an earlier vertex, so its dependencies have no cycles.

A directed acyclic graph (DAG) models workflow steps as directed dependencies without any closed loop. A sequential workflow is therefore a simple DAG: execution proceeds from A to B to C, but no later step points back to an earlier one. section 5.1

In machine-learning production, DAGs describe workflows such as data ingestion, model training, and model serving. One ingestion step can feed multiple training steps, which can feed different serving steps as the workflow grows more complex. section 5.1

Use the dependency structure to:

  • Represent which steps must finish before dependent steps begin. section 5.1
  • Branch after a shared step and join multiple branches at a later step. section 8.4.1
  • Reject cyclic designs: adding an edge from D back to A closes the loop and makes the workflow invalid. section 5.1

Diamond workflow in Argo

A starts the workflow; B and C depend on A; D depends on both B and C. Argo Workflows expresses these dependencies in Kubernetes and creates a Pod for each task. section 8.4.1

Figure 5.1 A diagram showing a simple machine learning workflow, including data ingestion, model training, and model serving. The arrows indicate directions. For example, the arrow on the right-hand side denotes the order of the step execution (e.g., the workflow executes the model serving step after the model training step is completed).
05-01

Trace a simple machine-learning DAG from data ingestion through model training to model serving; arrows show dependency and execution order. section 5.1

How Distributed Machine Learning Patterns covers it

How deep it goes
Defines acyclicity through sequential and branching examples, then applies dependencies in Argo YAML; it stops short of formal graph algorithms.
Examples
Uses sequential A-B-C workflows, invalid cycles, branched training pipelines, Argo diamond dependencies, and conditional coin-flip steps.
What it assumes
Assumes familiarity with workflow steps and Kubernetes basics while teaching DAG structure through concrete execution-order examples.
What you can do after
Build it from scratch as an Argo Workflow, submit it with kubectl, and inspect its Pods, status, logs, or UI graph.
How it connects
Connects DAGs to workflow orchestration, sequential workflows, Kubernetes, model training, and model serving.

Also explained in

Compare how 15 books explain directed acyclic graph →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Distributed Machine Learning Patterns. The section links point to the parts of the book it draws on.