Skip to content

Try 40K dataset (4x data) #141

Try 40K dataset (4x data)

Try 40K dataset (4x data) #141

Workflow file for this run

name: CML Report
on: pull_request
jobs:
run:
runs-on: [ubuntu-latest]
steps:
- uses: iterative/setup-cml@v1
- uses: actions/setup-node@v1 # https://github.com/iterative/cml/issues/1377
with:
node-version: '16'
- uses: iterative/setup-dvc@v1
- uses: actions/checkout@v3
with:
fetch-depth: 2
# Needed for https://github.com/iterative/example-repos-dev/issues/225
- name: Installs JSON5
run: npm install -g json5
- name: Generate metrics report
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cml ci
if [ $GITHUB_REF = refs/heads/main ]; then
PREVIOUS_REF=HEAD~1
else
PREVIOUS_REF=main
git fetch origin main:main
fi
dvc plots diff $PREVIOUS_REF workspace \
--show-vega --targets ROC | json5 > vega.json
vl2svg vega.json roc.svg
dvc plots diff $PREVIOUS_REF workspace \
--show-vega --targets Precision-Recall | json5 > vega.json
vl2svg vega.json prc.svg
dvc plots diff $PREVIOUS_REF workspace \
--show-vega --targets Confusion-Matrix | json5 > vega.json
vl2svg vega.json confusion.svg
dvc pull eval/importance.png
cp eval/importance.png importance_workspace.png
git checkout $PREVIOUS_REF -- dvc.lock
dvc pull eval/importance.png
cp eval/importance.png importance_previous.png
dvc_report=$(dvc exp diff $PREVIOUS_REF --md)
cat <<EOF > report.md
# CML Report
## Plots
![ROC](./roc.svg)
![Precision-Recall](./prc.svg)
![Confusion Matrix](./confusion.svg)
#### Feature Importance: ${PREVIOUS_REF}
![Feature Importance: ${PREVIOUS_REF}](./importance_previous.png)
#### Feature Importance: workspace
![Feature Importance: workspace](./importance_workspace.png)
## Metrics and Params
### ${PREVIOUS_REF} → workspace
${dvc_report}
EOF
cml comment create --publish --pr=false report.md