Skip to content

Commit

Permalink
Add testing against Botorch devel (#241)
Browse files Browse the repository at this point in the history
* add test against recent botorch

* blacklist basic doe tutorial

* bump botorch dependency
  • Loading branch information
jduerholt authored Jul 13, 2023
1 parent 9683758 commit 18b767b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,38 @@ jobs:
- name: Run pip freeze, Python ${{ matrix.python-version }}
run: pip freeze

testing_against_latest_botorch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install latest botorch
run: |
pip install --upgrade git+https://github.com/cornellius-gp/linear_operator.git
pip install --upgrade git+https://github.com/cornellius-gp/gpytorch.git
export ALLOW_LATEST_GPYTORCH_LINOP=true
pip install --upgrade git+https://github.com/pytorch/botorch.git
- name: Install Bofire, Python ${{ matrix.python-version }}
run: pip install ".[optimization,tests,cheminfo,xgb]"
- name: Install ipopt, Python ${{ matrix.python-version }}
run: sudo apt install build-essential pkg-config coinor-libipopt1v5 coinor-libipopt-dev
- name: Install cyipopt, Python ${{ matrix.python-version }}
run: pip install cyipopt
- name: Run tests, Python ${{ matrix.python-version }}
run: pytest -ra --cov=bofire --cov-report term-missing tests
- name: Run pip freeze, Python ${{ matrix.python-version }}
run: pip freeze


testing_tutorials:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install Bofire
run: pip install ".[optimization,tests,cheminfo,xgb]"
- name: Install ipopt
Expand Down
10 changes: 7 additions & 3 deletions scripts/run_tutorials.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@ def run_tutorials(
}
).set_index("name")

# ToDo: take care
# here are notebooks which are not tested due to random issues
blacklist = ["basic_examples.ipynb"]

for tutorial in tutorials:
print(42 * "#", tutorial)
# # for now we skip all tutorials but the one for which we have implemented SMOKE_TEST. This will change soon!
# if str(tutorial).split("/")[-1] not in running_tutorials:
# print("Skipping", str(tutorial))
# continue
if str(tutorial).split("/")[-1] in blacklist:
print("Skipping", str(tutorial))
continue
num_runs += 1
t1 = time.time()
run_out = run_script(tutorial, env=env, timeout_minutes=timeout_minutes)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
extras_require={
"optimization": [
"torch>=1.12",
"botorch>=0.8.4",
"botorch>=0.8.5",
"multiprocess",
"plotly",
"formulaic>=0.6.0",
Expand Down

0 comments on commit 18b767b

Please sign in to comment.