0
0
MLOpsdevops~10 mins

Parameterized pipeline runs in MLOps - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to pass a parameter named 'learning_rate' with value 0.01 to the pipeline run.

MLOps
pipeline_run = pipeline.run(parameters={"learning_rate": [1])
Drag options to blanks, or click blank then click option'
A0.1
B0.01
C1
D"0.01"
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the learning rate as a string instead of a float.
Using an incorrect value like 0.1.
2fill in blank
medium

Complete the code to retrieve the parameter 'batch_size' from the pipeline run's parameters dictionary.

MLOps
batch_size = pipeline_run.parameters.get([1], 32)
Drag options to blanks, or click blank then click option'
A"batch_size"
B"batch"
Cbatch_size
D"size"
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong key string like 'batch' or 'size'.
Using the variable name without quotes.
3fill in blank
hard

Fix the error in the code to correctly pass multiple parameters to the pipeline run.

MLOps
pipeline_run = pipeline.run(parameters=[1])
Drag options to blanks, or click blank then click option'
A"epochs=10, lr=0.001"
B["epochs", 10, "lr", 0.001]
C("epochs", 10, "lr", 0.001)
D{"epochs": 10, "lr": 0.001}
Attempts:
3 left
💡 Hint
Common Mistakes
Passing parameters as a list or tuple instead of a dictionary.
Passing parameters as a string.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that filters parameters with values greater than 0.5.

MLOps
filtered_params = {k: v for k, v in pipeline_run.parameters.items() if v [1] [2]
Drag options to blanks, or click blank then click option'
A>
B0.5
C<
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using less than operator instead of greater than.
Using wrong threshold values.
5fill in blank
hard

Fill all three blanks to create a dictionary of parameters where keys are uppercase and values are strings.

MLOps
param_strs = [1]: str([2]) for [3], v in pipeline_run.parameters.items()
Drag options to blanks, or click blank then click option'
Ak.upper()
Bv
Ck
Dv.upper()
Attempts:
3 left
💡 Hint
Common Mistakes
Using v.upper() which is invalid if value is not string.
Swapping key and value variables.