Skip to content

Commit

Permalink
separate action for notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Marton Havasi committed Dec 11, 2024
1 parent 1461ea7 commit 02d2d89
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ jobs:
run: |
coverage run --include='flow_matching/**/*.py' -m unittest discover tests -v
- name: Run notebooks
shell: bash -l {0}
working-directory: examples
run: |
set -e
PYTHONPATH=../
for file in ./*.ipynb; do
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=300 "$file"
done
- name: Docstring Lint
shell: bash -l {0}
run: |
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/notebooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Notebooks
on: push

jobs:
run-notebooks:
runs-on: ubuntu-20.04
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: Import flow_matching
run: |
python -c "import flow_matching; print('flow_matching module imported successfully')"
- name: Run notebooks
shell: bash -l {0}
working-directory: examples
run: |
set -e
PYTHONPATH=../
for file in ./*.ipynb; do
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=300 "$file"
done

0 comments on commit 02d2d89

Please sign in to comment.