FRML-44 Integrate CML #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Model Training | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: 'poetry' | |
- name: Install poetry | |
run: | | |
python3 -m pip install --user pipx | |
python -m pipx ensurepath | |
pipx install poetry | |
- name: Set up gcloud | |
id: 'auth' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: '${{ secrets.FRDC_DOWNLOAD_KEY }}' | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v1' | |
# We don't necessarily need to install the CUDA version of torch, so we'll do with cpu | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
poetry install --with dev,glcm | |
# pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 | |
- name: Test with pytest | |
run: | | |
pytest tests/model_tests | |