Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example-get-started: dvc run -> dvc stage add #154

Merged
merged 2 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions example-get-started/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ if [ $PROD == 'prod' ]; then
cmp $PACKAGE $TEST_PACKAGE # Expected output: nothing
rm -f $TEST_PACKAGE
cp -f $PACKAGE_DIR/README.md $TEST_DIR
cp -f $PACKAGE_DIR/.devcontainer.json $TEST_DIR
cp -f $PACKAGE_DIR/.gitattributes $TEST_DIR
diff -r $PACKAGE_DIR $TEST_DIR # Expected output: nothing
rm -fR $TEST_DIR

Expand Down
14 changes: 8 additions & 6 deletions example-get-started/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,38 +110,39 @@ git commit -m "Add source code files to repo"
git tag -a "5-source-code" -m "Source code added."


dvc run -n prepare \
dvc stage add -n prepare \
-p prepare.seed,prepare.split \
-d src/prepare.py -d data/data.xml \
-o data/prepared \
python src/prepare.py data/data.xml
dvc repro
git add data/.gitignore dvc.yaml dvc.lock
tick
git commit -m "Create data preparation stage"
git tag -a "6-prepare-stage" -m "First pipeline stage (data preparation) created."
dvc push


dvc run -n featurize \
dvc stage add -n featurize \
-p featurize.max_features,featurize.ngrams \
-d src/featurization.py -d data/prepared \
-o data/features \
python src/featurization.py \
data/prepared data/features
git add data/.gitignore dvc.yaml dvc.lock
dvc run -n train \
dvc stage add -n train \
-p train.seed,train.n_est,train.min_split \
-d src/train.py -d data/features \
-o model.pkl \
python src/train.py data/features model.pkl
git add .gitignore dvc.yaml dvc.lock
dvc repro
git add .gitignore data/.gitignore dvc.yaml dvc.lock
tick
git commit -m "Create ML pipeline stages"
git tag -a "7-ml-pipeline" -m "ML pipeline created."
dvc push


dvc run -n evaluate \
dvc stage add -n evaluate \
-d src/evaluate.py -d model.pkl -d data/features \
-M evaluation/metrics.json \
-O evaluation/plots/metrics \
Expand All @@ -155,6 +156,7 @@ dvc plots modify evaluation/plots/sklearn/confusion_matrix.json \
-x actual -y predicted -t confusion
dvc plots modify evaluation/plots/prc.json -x recall \
-y precision
dvc repro
git add .gitignore dvc.yaml dvc.lock evaluation
tick
git commit -m "Create evaluation stage"
Expand Down