0
0
ML Pythonml~10 mins

Data versioning (DVC) in ML Python - Interactive Code Practice

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

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

ML Python
dvc [1]
Drag options to blanks, or click blank then click option'
Ainit
Bcreate
Cstart
Dsetup
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' or 'create' instead of 'init' will cause an error.
Trying to run 'dvc setup' is not a valid DVC command.
2fill in blank
medium

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

ML Python
dvc [1] data.csv
Drag options to blanks, or click blank then click option'
Apush
Btrack
Cadd
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'track' is not a valid DVC command.
Confusing 'add' with 'push' which uploads data to remote storage.
3fill in blank
hard

Fix the error in the command to push data to remote storage using DVC.

ML Python
dvc [1]
Drag options to blanks, or click blank then click option'
Aupload
Bpush
Ctransfer
Dsend
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'upload' or 'send' causes a command not found error.
Confusing 'push' with 'pull' which downloads data.
4fill in blank
hard

Fill both blanks to create a DVC pipeline stage that runs 'train.py' and saves output to 'model.pkl'.

ML Python
dvc run -n train_model -d train.py -o [1] python [2]
Drag options to blanks, or click blank then click option'
Amodel.pkl
Btrain.py
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping output and script names causes the pipeline to fail.
Using the script name as output or vice versa is incorrect.
5fill in blank
hard

Fill all three blanks to create a DVC pipeline stage that depends on 'prepare.py' and 'data.csv', outputs 'features.csv', and runs 'prepare.py'.

ML Python
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.csv
Cfeatures.csv
Dmodel.pkl
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong files as dependencies or output causes pipeline errors.
Mixing up output and dependency files.