0
0
MLOpsdevops~10 mins

Pipeline components and DAGs 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 define a pipeline task using a decorator.

MLOps
@pipeline
 def my_pipeline():
     @[1]
     def preprocess():
         pass
Drag options to blanks, or click blank then click option'
Astep
Bcomponent
Ctask
Djob
Attempts:
3 left
💡 Hint
Common Mistakes
Using @step or @job which are not standard task decorators here.
2fill in blank
medium

Complete the code to create a Directed Acyclic Graph (DAG) for pipeline execution.

MLOps
with DAG('[1]', schedule_interval='@daily') as dag:
    pass
Drag options to blanks, or click blank then click option'
Apipeline_dag
Brun_pipeline
Cdag_pipeline
Dmy_pipeline
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic names like 'pipeline_dag' which may not match the pipeline.
3fill in blank
hard

Fix the error in the task dependency definition to ensure correct execution order.

MLOps
preprocess = task1()
train = task2()
train [1] preprocess
Drag options to blanks, or click blank then click option'
A>>
B<<
C+
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<<' which reverses the order causing errors.
4fill in blank
hard

Fill both blanks to define a pipeline component with input and output.

MLOps
def preprocess(data: [1]) -> [2]:
    # process data
    pass
Drag options to blanks, or click blank then click option'
ADataset
BModel
COutput
DInput
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing input/output with data types like Dataset or Model.
5fill in blank
hard

Fill all three blanks to create a pipeline step that runs a training component with parameters.

MLOps
train_step = [1](
    model_name=[2],
    epochs=[3]
)
Drag options to blanks, or click blank then click option'
Atrain_component
B'resnet50'
C10
Dtrain_pipeline
Attempts:
3 left
💡 Hint
Common Mistakes
Using pipeline name instead of component for first blank.
Putting number as string for epochs.