-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 1.53 KB
/
cml.yml
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
name: CML
on:
push:
branches: [main]
workflow_dispatch:
jobs:
launch-runner:
runs-on: ubuntu-latest
steps:
- uses: iterative/setup-cml@v1
- uses: actions/checkout@v3
- name: Deploy runner on Medium instance
env:
#
REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GOOGLE_APPLICATION_CREDENTIALS_DATA: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA }}
#
run: |
cml runner launch \
--cloud=gcp \
--cloud-region=europe-west6-b \
--cloud-type=m \
--labels=cml-runner
train:
needs: launch-runner
runs-on: [self-hosted, cml-runner]
timeout-minutes: 2880
steps:
- uses: iterative/setup-cml@v1
- uses: actions/checkout@v3
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
#
credentials_json: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA }}"
#
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
pipenv install --dev --system --deploy
- name: Train model, push data and create PR
env:
#
REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
#
run: |
dvc pull --allow-missing
dvc repro
dvc push
cml pr create . --merge