Skip to content

Commit

Permalink
Update nightly cron to use latest BoTorch for website built, use late…
Browse files Browse the repository at this point in the history
…st linear operator with latest BoTorch (#3302)

Summary:
Pull Request resolved: #3302

Nightly cron was using pinned BoTorch for the website build, which can lead to failures. Update the workflow to support latest BoTorch.
Updated all workflows that use latest BoTorch to also install latest linear operator package, which may be needed by latest BoTorch.

Reviewed By: CristianLara

Differential Revision: D69070370

fbshipit-source-id: 3001ae5ead0edff04ab9d80346496ed689a3a9f3
  • Loading branch information
saitcakmak authored and facebook-github-bot committed Feb 3, 2025
1 parent e946991 commit 257af9c
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
ALLOW_LATEST_GPYTORCH_LINOP: true
run: |
# use latest Botorch
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 ".[unittest]"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
contents: write
with:
run_tutorials: true
pinned_botorch: false

deploy-test-pypi:

Expand All @@ -68,6 +69,7 @@ jobs:
ALLOW_LATEST_GPYTORCH_LINOP: true
run: |
# use latest BoTorch
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 ".[dev,mysql,notebook]"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
with:
new_version: ${{ github.event.release.tag_name }}
run_tutorials: true
pinned_botorch: true
permissions:
pages: write
id-token: write
Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/publish_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ on:
required: false
type: boolean
default: true
pinned_botorch:
required: true
type: boolean
workflow_dispatch:

run_tutorials:
required: true
type: boolean
pinned_botorch:
required: true
type: boolean

jobs:

Expand Down Expand Up @@ -39,9 +47,22 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies

- 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.run_tutorials }}
name: Run Tutorials
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reusable_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
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 ${{ ((inputs.minimal_dependencies) && '.[unittest_minimal]') || '.[unittest]' }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reusable_tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
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]"
Expand Down

0 comments on commit 257af9c

Please sign in to comment.