0
0
MLOpsdevops~20 mins

Parameterized pipeline runs in MLOps - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Parameterized Pipeline Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the main benefit of parameterized pipeline runs?

In MLOps, why do we use parameterized pipeline runs?

ATo allow running the same pipeline with different inputs without changing the code
BTo make the pipeline run faster by skipping steps
CTo automatically fix errors during pipeline execution
DTo store pipeline results in a database
Attempts:
2 left
💡 Hint

Think about how you can reuse a pipeline for different data or settings.

💻 Command Output
intermediate
2:00remaining
Output of running a pipeline with parameters

Given this command to run a pipeline with parameters, what is the expected output snippet?

MLOps
mlflow pipelines run --pipeline-name my_pipeline --param learning_rate=0.01 --param epochs=10
ASyntaxError: invalid syntax near '--param'
BError: Unknown parameter 'learning_rate'
CPipeline 'my_pipeline' completed with default parameters
DStarting pipeline 'my_pipeline' with parameters: learning_rate=0.01, epochs=10
Attempts:
2 left
💡 Hint

Look for the message confirming the pipeline started with given parameters.

Configuration
advanced
2:30remaining
Correct YAML snippet for parameterized pipeline

Which YAML snippet correctly defines parameters for a pipeline step?

A
steps:
  - name: train
    parameters:
      learning_rate: 0.01
      epochs: 10
B
steps:
  - name: train
    params:
      learning_rate: 0.01
      epochs: 10
C
steps:
  - train:
      parameters:
        learning_rate: 0.01
        epochs: 10
D
steps:
  - name: train
    parameters: [learning_rate=0.01, epochs=10]
Attempts:
2 left
💡 Hint

Look for the correct key name and structure for parameters in YAML.

Troubleshoot
advanced
2:30remaining
Why does the pipeline fail when passing parameters?

You run a pipeline with parameters but get this error: TypeError: run() got an unexpected keyword argument 'lr'. What is the likely cause?

AThe pipeline code has a syntax error unrelated to parameters
BThe parameter name 'lr' is not defined in the pipeline code or config
CThe pipeline requires parameters to be passed as environment variables
DThe pipeline run command does not support parameters
Attempts:
2 left
💡 Hint

Check if the parameter name matches what the pipeline expects.

🔀 Workflow
expert
3:00remaining
Order of steps to run a parameterized pipeline

Arrange the steps in the correct order to run a parameterized pipeline successfully.

A1,3,2,4
B2,1,3,4
C1,2,3,4
D1,2,4,3
Attempts:
2 left
💡 Hint

Think about defining, passing, validating, then running.