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

Update Acquisition.optimize to use mixed optimizer if discrete parameters have high cardinality #3253

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bernardbeckerman
Copy link
Contributor

Summary:
optimize_acqf_discrete_local_search is not suitable for parameters with high cardinality, since it generates the neighbors by changing the value of one parameter at a time and trying out all possible values for that parameter. This can quickly get very expensive with high cardinality parameters.

This diff updates the dispatch logic to utilize the mixed alternating optimizer in cases with high cardinality discrete parameters. The optimizer will internally use continuous relaxation for high cardinality parameters while using nearest neighbor search for the low cardinality discrete parameters.

Reviewed By: bernardbeckerman

Differential Revision: D68357373

…ters have high cardinality

Summary:
`optimize_acqf_discrete_local_search` is not suitable for parameters with high cardinality, since it generates the neighbors by changing the value of one parameter at a time and trying out all possible values for that parameter. This can quickly get very expensive with high cardinality parameters.

This diff updates the dispatch logic to utilize the mixed alternating optimizer in cases with high cardinality discrete parameters. The optimizer will internally use continuous relaxation for high cardinality parameters while using nearest neighbor search for the low cardinality discrete parameters.

Reviewed By: bernardbeckerman

Differential Revision: D68357373
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jan 18, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68357373

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.87%. Comparing base (c3b8285) to head (f5c17f0).

Files with missing lines Patch % Lines
ax/models/torch/botorch_modular/acquisition.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3253      +/-   ##
==========================================
- Coverage   95.87%   95.87%   -0.01%     
==========================================
  Files         513      513              
  Lines       51712    51717       +5     
==========================================
+ Hits        49581    49585       +4     
- Misses       2131     2132       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Jan 22, 2025
…ters have high cardinality (facebook#3253)

Summary:
Pull Request resolved: facebook#3253

`optimize_acqf_discrete_local_search` is not suitable for parameters with high cardinality, since it generates the neighbors by changing the value of one parameter at a time and trying out all possible values for that parameter. This can quickly get very expensive with high cardinality parameters.

This diff updates the dispatch logic to utilize the mixed alternating optimizer in cases with high cardinality discrete parameters. The optimizer will internally use continuous relaxation for high cardinality parameters while using nearest neighbor search for the low cardinality discrete parameters.

Reviewed By: bernardbeckerman, Balandat

Differential Revision: D68357373
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants