Skip to content

Commit 5bbfbf4

Browse files
authored
Create train-eval.yml
1 parent f191268 commit 5bbfbf4

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/train-eval.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Train and Evaluate Model
2+
3+
on:
4+
push:
5+
branches: [main]
6+
schedule:
7+
- cron: "0 0 * * 0" # Weekly training at midnight on Sunday
8+
9+
jobs:
10+
train:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
pytorch: ["2.2.0+cu118"]
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.10'
21+
- name: Install PyTorch
22+
run: |
23+
pip install torch==$pytorch torchvision==0.17.0+cu118 torchaudio==2.2.0+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
24+
- name: Install dependencies
25+
run: |
26+
pip install -r requirements.txt
27+
- name: Train model
28+
run: |
29+
python train.py
30+
- name: Save trained model
31+
uses: actions/upload-artifact@v3
32+
with:
33+
name: trained_model
34+
path: checkpoints/

0 commit comments

Comments
 (0)