File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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/
You can’t perform that action at this time.
0 commit comments