File tree 4 files changed +55
-3
lines changed
4 files changed +55
-3
lines changed Original file line number Diff line number Diff line change
1
+ report :
2
+ image : dvcorg/cml:0-dvc3-base1
3
+ before_script :
4
+ - cml ci
5
+ - npm install -g json5
6
+ script : |
7
+ if [ $CI_COMMIT_BRANCH = main ]; then
8
+ PREVIOUS_REF=HEAD~1
9
+ else
10
+ PREVIOUS_REF=main
11
+ git fetch --depth=1 origin main:main
12
+ fi
13
+
14
+ dvc pull eval
15
+ dvc plots diff $PREVIOUS_REF workspace \
16
+ --show-vega --targets ROC | json5 > vega.json
17
+ vl2svg vega.json roc.svg
18
+
19
+ dvc plots diff $PREVIOUS_REF workspace \
20
+ --show-vega --targets Precision-Recall | json5 > vega.json
21
+ vl2svg vega.json prc.svg
22
+
23
+ dvc plots diff $PREVIOUS_REF workspace \
24
+ --show-vega --targets Confusion-Matrix | json5 > vega.json
25
+ vl2svg vega.json confusion.svg
26
+
27
+ cp eval/plots/images/importance.png importance_workspace.png
28
+
29
+ git checkout $PREVIOUS_REF -- dvc.lock
30
+ cp eval/plots/images/importance.png importance_previous.png
31
+
32
+ dvc_report=$(dvc exp diff $PREVIOUS_REF --md)
33
+
34
+ cat <<EOF > report.md
35
+ # CML Report
36
+ ## Plots
37
+ 
38
+ 
39
+ 
40
+ #### Feature Importance: ${PREVIOUS_REF}
41
+ 
42
+ #### Feature Importance: workspace
43
+ 
44
+
45
+ ## Metrics and Params
46
+ ### ${PREVIOUS_REF} → workspace
47
+ ${dvc_report}
48
+ EOF
49
+
50
+ cml comment create --publish --pr=false report.md
Original file line number Diff line number Diff line change 1
- [ ![ DVC] ( https://img.shields.io/badge/-Open_in_Studio-grey.svg?style=flat-square&logo=dvc )] ( https://studio.iterative.ai/team/Iterative/views/example-get-started-zde16i6c4g ) [ ![ DVC-metrics ] ( https://img.shields.io/badge/dynamic/json?style=flat-square&colorA=grey&colorB=F46737&label=Average%20Precision&url=https://github.com/iterative/example-get-started/raw/main/eval/metrics.json&query=avg_prec.test )] ( https://github.com/iterative/example-get-started/raw/main/eval/metrics.json )
1
+ [ ![ DVC] ( https://img.shields.io/badge/-Open_in_Studio-grey.svg?style=flat-square&logo=dvc )] ( https://studio.iterative.ai/team/Iterative/views/example-get-started-zde16i6c4g )
2
2
3
3
# DVC Get Started
4
4
@@ -18,7 +18,7 @@ classifier which can predict a post that is about the R language by tagging it
18
18
19
19
## Installation
20
20
21
- Python 3.7 + is required to run code from this repo.
21
+ Python 3.9 + is required to run code from this repo.
22
22
23
23
``` console
24
24
$ git clone https://github.com/iterative/example-get-started
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ rm -rf $TEST_DIR
13
13
mkdir $TEST_DIR
14
14
15
15
pushd $PACKAGE_DIR
16
- zip -r $PACKAGE params.yaml src/* .github/* .devcontainer/ *
16
+ zip -r $PACKAGE params.yaml src/* .github/*
17
17
popd
18
18
19
19
# Requires AWS CLI and write access to `s3://dvc-public/code/get-started/`.
@@ -32,6 +32,7 @@ if [ $PROD == 'prod' ]; then
32
32
rm -f $TEST_PACKAGE
33
33
cp -f $PACKAGE_DIR /README.md $TEST_DIR
34
34
cp -f $PACKAGE_DIR /.devcontainer.json $TEST_DIR
35
+ cp -f $PACKAGE_DIR /.gitlab-ci.yml $TEST_DIR
35
36
cp -f $PACKAGE_DIR /.gitattributes $TEST_DIR
36
37
diff -r $PACKAGE_DIR $TEST_DIR # Expected output: nothing
37
38
rm -fR $TEST_DIR
Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ if [ $OPT_INIT_GIT == 'true' ]; then
146
146
git checkout -b main
147
147
cp $HERE /code/README.md .
148
148
cp $HERE /code/.devcontainer.json .
149
+ cp $HERE /code/.gitlab-ci.yml .
149
150
cp $HERE /code/.gitattributes .
150
151
git add .
151
152
else
You can’t perform that action at this time.
0 commit comments