Reusable Tutorials Workflow #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Reusable Tutorials Workflow | |
on: | |
workflow_dispatch: | |
inputs: | |
scipy_version: | |
required: true | |
type: str | |
test_version: | |
required: true | |
type: str | |
workflow_call: | |
inputs: | |
smoke_test: | |
required: false | |
type: boolean | |
default: true | |
use_stable_pytorch_gpytorch: | |
required: false | |
type: boolean | |
default: false | |
use_stable_ax: | |
required: false | |
type: boolean | |
default: false | |
jobs: | |
tutorials: | |
name: Run tutorials | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Fetch all history for all tags and branches | |
# We need to do this so setuptools_scm knows how to set the BoTorch version. | |
run: git fetch --prune --unshallow | |
- name: Install BoTorch with tutorials dependencies | |
env: | |
ALLOW_LATEST_GPYTORCH_LINOP: true | |
run: | | |
pip install uv | |
uv pip install .[tutorials] --system | |
- name: Install Scipy | |
run: | | |
uv pip install scipy==${{ inputs.scipy_version }} --system | |
- name: Run tutorials with smoke test | |
run: | | |
python scripts/run_tutorials.py -p "$(pwd)" -s -n test${{ inputs.test_version }}.ipynb |