-
Notifications
You must be signed in to change notification settings - Fork 319
64 lines (58 loc) · 1.7 KB
/
reusable_tutorials.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Reusable Tutorials Workflow
on:
workflow_dispatch:
inputs:
smoke_test:
required: true
type: boolean
pinned_botorch:
required: true
type: boolean
workflow_call:
inputs:
smoke_test:
required: true
type: boolean
pinned_botorch:
required: true
type: boolean
jobs:
build-tutorials:
name: Tutorials
runs-on: ubuntu-latest
env:
# `uv pip ...` requires venv by default. This skips that requirement.
UV_SYSTEM_PYTHON: 1
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- if: ${{ inputs.pinned_botorch }}
name: Install dependencies with pinned BoTorch
run: |
uv pip install -e ".[tutorial]"
- if: ${{ !inputs.pinned_botorch }}
name: Install dependencies with latest BoTorch
env:
ALLOW_BOTORCH_LATEST: true
ALLOW_LATEST_GPYTORCH_LINOP: true
run: |
uv pip install git+https://github.com/cornellius-gp/linear_operator.git
uv pip install git+https://github.com/cornellius-gp/gpytorch.git
uv pip install git+https://github.com/pytorch/botorch.git
uv pip install -e ".[tutorial]"
- if: ${{ inputs.smoke_test }}
name: Run tutorials with smoke test
run: |
python scripts/run_tutorials.py -w $(pwd) -s
- if: ${{ !inputs.smoke_test }}
name: Run tutorials without smoke test
run: |
python scripts/run_tutorials.py -w $(pwd)
- name: Build tutorials
run : |
python scripts/convert_ipynb_to_mdx.py --clean