Run multiple pipeline instances in parallel

Launch multiple instances of your pipeline, each with different parameter configurations. This pattern scales your ML workflows across multiple contexts: different factories, regions, customers, or any dimension that requires isolated pipeline runs.

When to use parallel pipelines

Parallel pipeline runs solve the multi-context problem: when you need the same workflow executed independently for different scenarios.

Common scenarios:

  • Multi-site deployments: Train site-specific models (factories, stores, regions)

  • Customer-specific models: Fine-tune base models for different clients

  • A/B testing pipelines: Run competing pipeline configurations side-by-side

  • Multi-domain training: Apply the same pipeline to different data domains

💡 Parallel pipelines vs. task nodes: Use parallel pipelines when each context needs its own complete pipeline. Use task nodes when you want parallel execution within a single pipeline.

Prerequisites

Before creating parallel pipeline runs:

  1. Define at least one pipeline parameter in your valohai.yaml

  2. Push your pipeline configuration to a Git repository

  3. Fetch the latest commit in your Valohai project

Example: Multi-factory pipeline

Here's a pipeline that processes factory-specific data. The factory_id parameter creates separate pipeline instances:

Create parallel pipelines in the UI

Transform your single pipeline into multiple parallel runs with different configurations:

Step-by-step setup

  1. Navigate to pipelines

    • Open your project

    • Click the Pipelines tab

    • Click Create Pipeline

  2. Select your blueprint

    • Choose your commit

    • Select the pipeline with parameters

  3. Configure for parallel execution

    • Scroll to Pipeline Parameters

    • Change dropdown from "Single Pipeline" to "Pipeline Task"

    • Toggle Variant to "on"

  4. Define parameter variations

    • Enter each parameter value on a new line

    • Each value creates a separate pipeline instance

  5. Launch the pipelines

    • Click Create Pipeline

    • View your Pipeline Task containing all instances

Configuration example

For example, three factory IDs create three independent pipelines:

  • Pipeline 1: factory_berlin

  • Pipeline 2: factory_munich

  • Pipeline 3: factory_hamburg

Each pipeline runs the complete workflow with its specific factory context.

Parameter configuration patterns

Simple list (one parameter)

Multiple parameters

When you have multiple pipeline parameters, Valohai creates pipelines for every combination:

  • Parameter 1: region → europe, asia

  • Parameter 2: model_size → small, large

Result: 4 pipelines (europe-small, europe-large, asia-small, asia-large)

Dynamic parameter usage

Use parameters in your steps to create context-specific behavior:

Combine with task nodes

You can use both patterns together: parallel pipelines where each pipeline contains task nodes for hyperparameter tuning:

This creates multiple factory-specific pipelines, each running hyperparameter optimization.

Last updated

Was this helpful?