-
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.21 KB
/
cml.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: model-training
on: [push, workflow_dispatch]
jobs:
run:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-python@v2
with:
python-version: '3.8'
cache: 'pip'
- uses: iterative/setup-cml@v1
- name: Train model
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: eu-west-1
run: |
pip install -r requirements.txt
pip install "s3fs==2021.8.0"
pip freeze
dvc repro
echo "## Metrics" > report.md
git fetch --prune
dvc metrics diff main --show-md | grep "Change\|\-\-\-" >> report.md
dvc metrics diff main --show-md | grep "weighted" | sort >> report.md
sed "s/results\///g" -i report.md
cml-send-comment --pr report.md
dvc push
- uses: EndBug/add-and-commit@v7
with:
add: 'dvc.lock --force'
pull_strategy: 'NO-PULL'
message: 'chg: dvc repro'