0
0
MLOpsdevops~10 mins

Data pipelines with DVC in MLOps - Interactive Code Practice

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

Complete the command to initialize a new DVC project in your current directory.

MLOps
dvc [1]
Drag options to blanks, or click blank then click option'
Acreate
Bstart
Cinit
Dsetup
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' instead of 'init' will cause an error.
Trying 'create' or 'setup' are not valid DVC commands.
2fill in blank
medium

Complete the command to add a data file named 'data.csv' to DVC tracking.

MLOps
dvc [1] data.csv
Drag options to blanks, or click blank then click option'
Acommit
Btrack
Cpush
Dadd
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'track' is not a DVC command.
Using 'push' uploads data but does not track it.
Using 'commit' is a Git command, not DVC.
3fill in blank
hard

Fix the error in the command to run a DVC pipeline stage defined in 'dvc.yaml'.

MLOps
dvc [1]
Drag options to blanks, or click blank then click option'
Arun
Bexecute
Cstart
Dbuild
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'execute' or 'build' will cause an error.
Using 'start' is not a valid DVC command.
4fill in blank
hard

Fill both blanks to define a DVC pipeline stage that runs 'python train.py' with input 'data.csv' and output 'model.pkl'.

MLOps
dvc run -n train_model -d data.csv -o [1] [2]
Drag options to blanks, or click blank then click option'
Amodel.pkl
Bpython train.py
Ctrain.py
Ddata.csv
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the input file as output.
Using only the script name without 'python'.
5fill in blank
hard

Fill all three blanks to create a DVC pipeline stage that depends on 'prepare.py', uses 'data/raw.csv' as input, and outputs 'data/clean.csv'.

MLOps
dvc run -n prepare_data -d [1] -d [2] -o [3] python prepare.py
Drag options to blanks, or click blank then click option'
Aprepare.py
Bdata/raw.csv
Cdata/clean.csv
Ddata/input.csv
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong input file names.
Missing the script as a dependency.