liveBook · Manning

Fan-out

As explained in Distributed Machine Learning Patterns

A fan-out pattern starts multiple separate workflow steps from a single upstream step so they can process the same input or output.

Fan-out starts multiple separate workflow steps from one upstream step, letting each branch handle the same workflow input. In machine-learning pipelines, it turns a linear path such as data ingestion, model training, and model serving into a composable structure that can train or serve through several alternatives. section 5.2.2 section 5.9

Use fan-out when branches are independent and can run without relying on a particular execution or return order. It is most useful when sequential execution would take a long time; concurrent branches can then shorten the workflow while exploring multiple models or processing paths. section 5.2.3

A fan-out workflow commonly follows this flow:

  • Start with a shared upstream step, such as data ingestion for an updated dataset. section 5.2
  • Connect that step to separate model-training branches that use the same dataset but different model implementations. section 5.2.2
  • Select sufficiently accurate trained models and route selected models into separate serving branches when multiple predictions are useful. section 5.2.2
  • Combine branch outputs with fan-in when a single user-facing result is required. section 5.2.2

Training several entity-tagging models

After data ingestion, three independent training steps produce models with different tagging accuracy. A selection step keeps the top two models meeting a 90% accuracy threshold, and separate serving steps generate predictions from both. Aggregating those predictions can cover more entities than either model alone, because the models may capture different information. section 5.2.2

Fan-out is an architectural abstraction rather than a guarantee of correctness or speed. Branches must be safe to execute independently; a step that depends on completion of other training steps introduces waiting and ordering requirements that conflict with unconstrained concurrent execution. Use the pattern to organize complex workflows around real performance and reliability needs, not merely to add branches. section 5.2.3 section 5.0

Figure 5.12 A diagram of the fan-out pattern that appears when multiple separate model training steps are connected to the data ingestion step
05-12

The diagram isolates the core shape: one data-ingestion step connects directly to several separate model-training steps. section 5.2.2

How Distributed Machine Learning Patterns covers it

How deep it goes
Defines the branching pattern and works through a multi-model workflow, while deferring implementation details.
Examples
Uses YouTube-8M entity tagging with three training branches, two selected models, separate serving, and aggregated predictions.
What it assumes
Assumes familiarity with data ingestion, model training, and model serving, then builds branching workflows from those steps.
What you can do after
Apply it to organize independent branches for training or serving within a complex machine-learning workflow.
How it connects
Connects data ingestion, model training, model serving, model selection, fan-in, concurrency, and ensemble learning.

Also explained in

Compare how 2 books explain fan-out →

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.