0
0
MLOpsdevops~10 mins

Parameterized pipeline runs in MLOps - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Parameterized pipeline runs
Define pipeline with parameters
Trigger pipeline run
Pass parameter values
Pipeline reads parameters
Execute pipeline steps using parameters
Pipeline completes with outputs based on parameters
This flow shows how a pipeline is defined with parameters, triggered with specific values, and runs using those values.
Execution Sample
MLOps
pipeline:
  parameters:
    - name: learning_rate
      type: float
  steps:
    - train_model:
        run: train.py
        args: --lr ${{ parameters.learning_rate }}
A pipeline definition with a learning_rate parameter passed to a training step.
Process Table
StepActionParameterValue PassedEffect
1Pipeline definedlearning_ratefloat type, no value yetPipeline ready to accept parameter
2Pipeline triggeredlearning_rate0.01Parameter value set for this run
3Step train_model startslearning_rate0.01Training script receives --lr 0.01
4Training executeslearning_rate0.01Model trains with learning rate 0.01
5Pipeline completeslearning_rate0.01Outputs reflect training with 0.01
6Pipeline triggered againlearning_rate0.1New run with different parameter
7Step train_model startslearning_rate0.1Training script receives --lr 0.1
8Training executeslearning_rate0.1Model trains with learning rate 0.1
9Pipeline completeslearning_rate0.1Outputs reflect training with 0.1
💡 Pipeline runs stop after all steps complete using passed parameters.
Status Tracker
VariableStartAfter Run 1After Run 2Final
learning_rateundefined0.010.10.1
Key Moments - 3 Insights
Why does the pipeline need parameters instead of hardcoded values?
Parameters let you run the same pipeline with different inputs without changing the code, as shown in rows 2 and 6 where different values are passed.
What happens if you trigger the pipeline without passing a parameter value?
The pipeline may use a default or fail; in this example, the parameter must be passed as shown in the execution table rows where values are explicitly set.
How does the training step know which parameter value to use?
The pipeline passes the parameter value to the step as an argument, seen in rows 3 and 7 where the training script receives the --lr argument.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the learning_rate value passed at step 7?
A0.1
B0.01
Cundefined
D0.001
💡 Hint
Check the 'Value Passed' column at step 7 in the execution table.
At which step does the pipeline first complete using the parameter value?
AStep 6
BStep 4
CStep 5
DStep 9
💡 Hint
Look for the 'Pipeline completes' action in the execution table.
If you change the parameter learning_rate to 0.05 in the second run, which step would change?
AStep 2 and 3
BStep 7 and 8
CStep 1 only
DStep 9 only
💡 Hint
Parameter values are passed and used in the training step as shown in steps 7 and 8.
Concept Snapshot
Parameterized Pipeline Runs:
- Define parameters in pipeline YAML
- Trigger runs passing parameter values
- Pipeline steps use parameters as inputs
- Enables flexible runs without code changes
- Outputs depend on parameter values
Full Transcript
This visual execution shows how parameterized pipeline runs work in MLOps. First, a pipeline is defined with parameters like learning_rate. When triggered, the pipeline run receives specific values for these parameters. Each step in the pipeline reads the parameter values and uses them, for example passing --lr 0.01 to a training script. The pipeline completes and outputs results based on the parameter. Running the pipeline again with a different parameter value (like 0.1) repeats the process with new inputs. This allows flexible experimentation without changing pipeline code.