-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcml.yaml
More file actions
40 lines (40 loc) · 1.31 KB
/
cml.yaml
File metadata and controls
40 lines (40 loc) · 1.31 KB
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: train-my-model
on: [push]
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- uses: iterative/setup-dvc@v1
- uses: iterative/setup-cml@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache data
uses: actions/cache@v3
with:
path: ./data
key: ${{ matrix.os }}-py${{ matrix.python-version }}-dvc
restore-keys: |
${{ matrix.os }}-py${{ matrix.python-version }}-dvc
- name: Train model
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}
run: |
pip install -r requirements.txt # install dependencies
dvc pull
python ./src/models/train_model.py # run training
- name: Write report
env:
# this authenticates that the right permissions are in place
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cat classification_report.txt >> report.md
cml-publish confusion_matrix.png --md >> report.md
cml-send-comment report.md