-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (44 loc) · 1.15 KB
/
run.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
name: Model Training Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
train:
runs-on: ubuntu-latest
steps:
- name: dirty-moni-detector
uses: actions/checkout@v2
- name: Set up Python Environment
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Load Dataset
run: python load_data.py
- name: Train Model
run: python train.py --epochs $Epochs --lr $LR
- name: Evaluate Metrics
run: python evaluate.py --model outputs/model.pth
- name: Save Results
uses: actions/upload-artifact@v2
with:
name: results
path: outputs
deploy:
needs: train
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: results
path: outputs
- name: Deploy Model
run: python deploy.py --model outputs/model.pth