Skip to content

fixups for website (#528) #29

fixups for website (#528)

fixups for website (#528) #29

Workflow file for this run

name: Run Tutorials
on:
push:
branches:
- main
release:
types: [ published ]
jobs:
build:
name: Run Tutorials
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Modify notebook parameters
run: |
# Replace parameters to reduce exec time of 07_gradient_descent
sed -i 's/batch_size = 4/batch_size = 1/' docs/tutorials/07_gradient_descent.ipynb
sed -i 's/for epoch in range(10):/for epoch in range(1):/' docs/tutorials/07_gradient_descent.ipynb
sed -i 's/inputs = jnp.asarray(np.random.rand(100, 2))/inputs = jnp.asarray(np.random.rand(3, 2))/' docs/tutorials/07_gradient_descent.ipynb
sed -i 's/t_max = 5.0/t_max = 3.0/' docs/tutorials/07_gradient_descent.ipynb
- name: Test notebooks
run: |
for notebook in docs/tutorials/*.ipynb; do
echo "Testing $notebook"
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=600 "$notebook"
done