Skip to content

Commit

Permalink
notebook runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Marton Havasi committed Dec 11, 2024
1 parent 9d2160b commit 1186985
Show file tree
Hide file tree
Showing 2 changed files with 27 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/[email protected]
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
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ dependencies:
- scikit-learn
- pydoclint
- coverage
- jupyter

0 comments on commit 1186985

Please sign in to comment.