-
Notifications
You must be signed in to change notification settings - Fork 57
34 lines (29 loc) · 1.04 KB
/
notebooks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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: Run notebooks
shell: bash -l {0}
env:
PYTHONPATH: $PYTHONPATH:$PWD
run: |
set +e
cd examples/
python -m flow_matching "import flow_matching; print('flow_matching module imported successfully')"
python -c "import flow_matching; print('flow_matching module imported successfully')"
python -c "import sys; print(sys.path)"
cd ..
for file in examples/*.ipynb; do
PYTHONPATH=$PYTHONPATH jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=300 "$file"
done