Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FRML-67 Fix CML not leveraging GPU #20

Merged
merged 7 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
volumes:
- /home/runner/work/frdc-ml/_github_home:/root
env:
# This is where setup-python will install and cache the venv
AGENT_TOOLSDIRECTORY: "/root/venv"
options: --gpus all

steps:
- uses: actions/checkout@v3
Expand All @@ -34,7 +36,10 @@ jobs:
pip3 install -r requirements.txt
pip3 install torch torchvision torchaudio

- name: Set up gcloud
- name: Check CUDA is available
run: nvidia-smi

- name: Auth gcloud
id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand All @@ -47,10 +52,12 @@ jobs:
run: |
echo "WANDB_API_KEY=${{ secrets.WANDB_API_KEY }}" >> $GITHUB_ENV

# Our project has src as a source path, explicitly add that in.
- name: Add src as PYTHONPATH
run: |
echo "PYTHONPATH=src" >> $GITHUB_ENV

# Do not do cd as it'll break PYTHONPATH.
- name: Run Model Training
run: |
python3 -m tests.model_tests.chestnut_dec_may.main
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,5 @@ cython_debug/
rsc/**/*.tif

**/*/lightning_logs
*.zip
*.zip
*.sh
2 changes: 1 addition & 1 deletion tests/model_tests/chestnut_dec_may/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def train_val_test_split(
# TODO: Though this is set, the results are still not reproducible.
deterministic=True,
# fast_dev_run=True,
accelerator="cpu",
accelerator="gpu",
log_every_n_steps=4,
callbacks=[
# Stop training if the validation loss doesn't improve for 4 epochs
Expand Down