-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (40 loc) · 1.12 KB
/
continuous_training.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: Continuous Training
on:
push:
branches:
- main
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
inputs:
reason:
description: Why to run this?
required: false
default: running CT
jobs:
continuous-training:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Train model
env:
WHYLOGS_ACCOUNT_KEY: ${{ secrets.WHYLOGS_ACCOUNT_KEY }}}
run: |
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
mlflow db upgrade sqlite:///mydb.sqlite
python3 model.py
echo "Training Completed"
- name: Commit model changes
run: |
git config --local user.email "encinaesteban27@gmail.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Updating model serialization"
- uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}