Skip to content

FRML-44 Integrate CML #16

FRML-44 Integrate CML

FRML-44 Integrate CML #16

Workflow file for this run

name: Model Training
on:
push:
branches: [ "main" ]
pull_request:
jobs:
build:
runs-on: self-hosted
container: docker://ghcr.io/iterative/cml:0-dvc2-base1-gpu
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
python3 -m pipx ensurepath
echo "$(python -m site --user-base)/bin" >> $GITHUB_PATH
python3 -m pipx install poetry
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
- 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 through poetry
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 through poetry
run: |
poetry run pytest