liveBook · Manning

Self.next function

As explained in Designing Deep Learning Systems: A guide for software engineers

A Metaflow API function that declares the successor step or steps for a workflow step.

self.next connects Metaflow steps directly in workflow code, allowing the framework to construct a workflow DAG without a separate graph definition. section 9.3.3

Use self.next to express workflow control flow:

  • Keep workflow definition and prototype code together so the same implementation can be tested locally and exported to production orchestrators. section 9.3.3

Sequential and branching workflow

A start step calls self.next(self.transform_data). The transform step calls self.next(self.save_to_db, self.notify_data_science_team), creating two branches that can later converge at self.join.

How Designing Deep Learning Systems: A guide for software engineers covers it

How deep it goes
Defines sequential and fan-out connections with examples, but does not detail runtime implementation.
Examples
Demonstrates sequential transformation, fan-out to database and notification branches, and convergence at a join step.
What it assumes
Assumes Python workflow code and Metaflow step annotations; teaches DAG construction without a separate workflow definition.
What you can do after
Build it from scratch by connecting Metaflow steps, including sequential transitions and parallel branches, then validate locally.
How it connects
Links @step annotations, workflow DAGs, local execution, AWS Step Functions, and Argo Workflows.

This explainer was generated by Manning's knowledge graph from the text of Designing Deep Learning Systems: A guide for software engineers. The section links point to the parts of the book it draws on.