-
Notifications
You must be signed in to change notification settings - Fork 13
67 lines (54 loc) · 1.73 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: train-my-model
on: [push]
jobs:
deploy-runner:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: iterative/setup-cml@v1
- name: deploy
shell: bash
env:
repo_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
cml-runner \
--cloud aws \
--cloud-region us-west \
--cloud-type=g3.4xlarge \
--cloud-hdd-size 64 \
--labels=cml-runner
run:
needs: deploy-runner
runs-on: [self-hosted,cml-runner]
container:
image: docker://iterativeai/cml
options: --gpus all
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: cml
env:
repo_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
apt-get update -y
apt install imagemagick -y
pip install -r requirements.txt
# DVC stuff
git fetch --prune
dvc repro
echo "# Style transfer" >> report.md
git show origin/master:final_owl.png > master_owl.png
convert +append final_owl.png master_owl.png out.png
convert out.png -resize 75% out_shrink.png
echo "### Workspace vs. Main" >> report.md
cml-publish out_shrink.png --md --title 'compare' >> report.md
echo "## Training metrics" >> report.md
dvc params diff master --show-md >> report.md
echo >> report.md
echo "## GPU info" >> report.md
cat gpu_info.txt >> report.md
cml-send-comment report.md