Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass two arguments to the forward of ConstrainedMCObjective to support botorch=0.10.0 #106

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

nzw0301
Copy link
Member

@nzw0301 nzw0301 commented Mar 20, 2024

Motivation

Resolve #97.

Description of the changes

Revert #96 and pass two arguments to ConstrainedMCObjective's forward that should take two arguments since v0.10.0 by pytorch/botorch#2199 and older botorch supports both one and two arguments.

@nzw0301
Copy link
Member Author

nzw0301 commented Mar 20, 2024

The test seems fine with the oldest botorch version supported by optuna:

$ pip install "botorch<=0.8.1"
...
$ pytest tests/test_botorch.py
========================================================================== test session starts ===========================================================================
platform darwin -- Python 3.10.13, pytest-8.0.1, pluggy-1.4.0
rootdir: /Users/nzw0301/Documents/oss/optuna-integration
configfile: pyproject.toml
plugins: jaxtyping-0.2.28, anyio-4.3.0, typeguard-2.13.3
collected 40 items
...
============================================================== 39 passed, 1 skipped, 132 warnings in 41.40s ==============================================================

@y0z y0z added the enhancement Change that does not break compatibility and not affect public interfaces, but improves performance. label Mar 27, 2024
Copy link

github-actions bot commented Apr 3, 2024

This pull request has not seen any recent activity.

@github-actions github-actions bot added the stale Exempt from stale bot labeling. label Apr 3, 2024
Copy link
Contributor

@eukaryo eukaryo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@eukaryo eukaryo merged commit 69187b5 into optuna:main Apr 5, 2024
12 checks passed
@eukaryo eukaryo removed the stale Exempt from stale bot labeling. label Apr 5, 2024
@eukaryo eukaryo added this to the v4.0.0 milestone Apr 5, 2024
@nzw0301 nzw0301 deleted the support-botorch-0.10.0 branch April 5, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Change that does not break compatibility and not affect public interfaces, but improves performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support botorch 0.10.0
4 participants