CI/CD pentru Machine Learning
Ravi Bhadauria
Machine Learning Engineer

Secvență de etape ce definesc fluxul ML și dependențele
Definit în fișierul dvc.yaml
deps)cmd)outs)metrics și plotsSimilar fluxului GitHub Actions
dvc stage adddvc stage add \
-n preprocess \
-d raw_data.csv -d preprocess.py \
-o processed_data.csv \
python preprocess.py
dvc.yamlstages:
preprocess:
cmd: python preprocess.py
deps:
- preprocess.py
- raw_data.csv
outs:
- processed_data.csv
dvc stage add \
-n train \
-d train.py -d processed_data.csv \
-o plots.png -o metrics.txt \
python train.py
stages: preprocess: cmd: python preprocess.py deps: - preprocess.py - raw_data.csv outs: - processed_data.csvtrain: cmd: python train.py deps: - processed_data.csv - train.py outs: - plots.png
dvc repro-> dvc repro Running stage 'preprocess': > python preprocess.pyRunning stage 'train': > python train.py Updating lock file 'dvc.lock'
dvc.lock.dvc, stochează hash-uri MD5git add dvc.lock && git commit -m "first pipeline repro"`-> dvc repro
Stage 'preprocess' didn't change, skipping
Running stage 'train' with command: ...
-> dvc dag
+------------+
| preprocess |
+------------+
*
*
*
+-------+
| train |
+-------+
dvc.yaml și dvc.lockdvc stage adddvc reprodvc dagCI/CD pentru Machine Learning