Skip to content

Commit

Permalink
Running notebooks in CI (#10)
Browse files Browse the repository at this point in the history
* notebook runner

* remove duplicate jupyter requirement

---------

Co-authored-by: Marton Havasi <marton@meta.com>
  • Loading branch information
mhavasi and Marton Havasi authored Dec 12, 2024
1 parent 6ac7bcc commit 3bbe2eb
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/notebooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Notebooks
on: push

jobs:
run-notebooks:
runs-on: 4-core-ubuntu-gpu-t4
steps:
- uses: actions/checkout@v2
- uses: mamba-org/setup-micromamba@v1.8.1
with:
environment-file: environment.yml
cache-environment: true

- name: Check GPU availability
shell: bash -l {0}
run: |
python -c "import torch; print('Is CUDA available:', torch.cuda.is_available())"
- name: Run notebooks
shell: bash -l {0}
run: |
set -e
export PYTHONPATH=${PWD}:$PYTHONPATH
for file in examples/*.ipynb; do
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=300 "$file"
done

0 comments on commit 3bbe2eb

Please sign in to comment.