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

MBM Surrogate: Clean up model fitting behavior and **kwargs usage #1882

Closed
wants to merge 1 commit into from

Conversation

saitcakmak
Copy link
Contributor

Summary:
Kwargs: These were originally added to support passing around additional kwargs in subclasses that no-longer exist. They later silently took on the role of carrying the kwargs that gets passed down to model input constructors. The argument name has been updated with added docstring explaining what these do. These are now used to update Surrogate.model_options and passed to the input constructors from there.

Model fitting clean up: We had a bunch of duplicate logic for constructing the models, left over from the merger of Surrogate & ListSurrogate, which led to several bugs in the past and made the code much harder to maintain and review. This diff deduplicates and simplifies the model fitting logic.

Differential Revision: D49707895

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Sep 28, 2023
@facebook-github-bot
Copy link
Contributor

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (7749c7a) 94.60% compared to head (7659303) 94.62%.

❗ Current head 7659303 differs from pull request most recent head 31f5f34. Consider uploading reports for the commit 31f5f34 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1882      +/-   ##
==========================================
+ Coverage   94.60%   94.62%   +0.01%     
==========================================
  Files         459      459              
  Lines       43771    43730      -41     
==========================================
- Hits        41410    41378      -32     
+ Misses       2361     2352       -9     
Files Coverage Δ
ax/modelbridge/tests/test_registry.py 99.14% <100.00%> (ø)
ax/models/torch/botorch_modular/model.py 95.06% <100.00%> (+0.47%) ⬆️
ax/models/torch/botorch_modular/surrogate.py 96.74% <100.00%> (+2.64%) ⬆️
ax/models/torch/botorch_modular/utils.py 98.75% <100.00%> (-0.02%) ⬇️
ax/models/torch/tests/test_acquisition.py 99.17% <ø> (ø)
ax/models/torch/tests/test_model.py 100.00% <100.00%> (ø)
ax/models/torch/tests/test_surrogate.py 99.77% <100.00%> (-0.01%) ⬇️
ax/models/torch/tests/test_utils.py 100.00% <100.00%> (ø)

☔ 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 Sep 28, 2023
…cebook#1882)

Summary:

Kwargs: These were originally added to support passing around additional kwargs in subclasses that no-longer exist. They later silently took on the role of carrying the kwargs that gets passed down to model input constructors. The argument name has been updated with added docstring explaining what these do. These are now used to update `Surrogate.model_options` and passed to the input constructors from there.

Model fitting clean up: We had a bunch of duplicate logic for constructing the models, left over from the merger of `Surrogate` & `ListSurrogate`, which led to several bugs in the past and made the code much harder to maintain and review. This diff deduplicates and simplifies the model fitting logic.

Differential Revision: D49707895
@facebook-github-bot
Copy link
Contributor

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

saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Sep 29, 2023
…cebook#1882)

Summary:

Kwargs: These were originally added to support passing around additional kwargs in subclasses that no-longer exist. They later silently took on the role of carrying the kwargs that gets passed down to model input constructors. The argument name has been updated with added docstring explaining what these do. These are now used to update `Surrogate.model_options` and passed to the input constructors from there.

Model fitting clean up: We had a bunch of duplicate logic for constructing the models, left over from the merger of `Surrogate` & `ListSurrogate`, which led to several bugs in the past and made the code much harder to maintain and review. This diff deduplicates and simplifies the model fitting logic.

Differential Revision: D49707895
@facebook-github-bot
Copy link
Contributor

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

saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Sep 29, 2023
…cebook#1882)

Summary:

Kwargs: These were originally added to support passing around additional kwargs in subclasses that no-longer exist. They later silently took on the role of carrying the kwargs that gets passed down to model input constructors. The argument name has been updated with added docstring explaining what these do. These are now used to update `Surrogate.model_options` and passed to the input constructors from there.

Model fitting clean up: We had a bunch of duplicate logic for constructing the models, left over from the merger of `Surrogate` & `ListSurrogate`, which led to several bugs in the past and made the code much harder to maintain and review. This diff deduplicates and simplifies the model fitting logic.

Differential Revision: D49707895
@facebook-github-bot
Copy link
Contributor

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

saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Oct 6, 2023
…cebook#1882)

Summary:

Kwargs: These were originally added to support passing around additional kwargs in subclasses that no-longer exist. They later silently took on the role of carrying the kwargs that gets passed down to model input constructors. The argument name has been updated with added docstring explaining what these do. These are now used to update `Surrogate.model_options` and passed to the input constructors from there.

Model fitting clean up: We had a bunch of duplicate logic for constructing the models, left over from the merger of `Surrogate` & `ListSurrogate`, which led to several bugs in the past and made the code much harder to maintain and review. This diff deduplicates and simplifies the model fitting logic.

Differential Revision: D49707895
@facebook-github-bot
Copy link
Contributor

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

saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Oct 6, 2023
…cebook#1882)

Summary:

Kwargs: These were originally added to support passing around additional kwargs in subclasses that no-longer exist. They later silently took on the role of carrying the kwargs that gets passed down to model input constructors. The argument name has been updated with added docstring explaining what these do. These are now used to update `Surrogate.model_options` and passed to the input constructors from there.

Model fitting clean up: We had a bunch of duplicate logic for constructing the models, left over from the merger of `Surrogate` & `ListSurrogate`, which led to several bugs in the past and made the code much harder to maintain and review. This diff deduplicates and simplifies the model fitting logic.

Differential Revision: D49707895
@facebook-github-bot
Copy link
Contributor

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

saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Oct 6, 2023
…cebook#1882)

Summary:
Pull Request resolved: facebook#1882

Kwargs: These were originally added to support passing around additional kwargs in subclasses that no-longer exist. They later silently took on the role of carrying the kwargs that gets passed down to model input constructors. The argument name has been updated with added docstring explaining what these do. These are now used to update `Surrogate.model_options` and passed to the input constructors from there.

Model fitting clean up: We had a bunch of duplicate logic for constructing the models, left over from the merger of `Surrogate` & `ListSurrogate`, which led to several bugs in the past and made the code much harder to maintain and review. This diff deduplicates and simplifies the model fitting logic.

Differential Revision: https://internalfb.com/D49707895

fbshipit-source-id: c99838e7619dc120ccd280cde3ef8cd4e376cfe1
saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Oct 6, 2023
…cebook#1882)

Summary:
Pull Request resolved: facebook#1882

Kwargs: These were originally added to support passing around additional kwargs in subclasses that no-longer exist. They later silently took on the role of carrying the kwargs that gets passed down to model input constructors. The argument name has been updated with added docstring explaining what these do. These are now used to update `Surrogate.model_options` and passed to the input constructors from there.

Model fitting clean up: We had a bunch of duplicate logic for constructing the models, left over from the merger of `Surrogate` & `ListSurrogate`, which led to several bugs in the past and made the code much harder to maintain and review. This diff deduplicates and simplifies the model fitting logic.

Differential Revision: https://internalfb.com/D49707895

fbshipit-source-id: 7dc375023b37a17468682e0bf602949a25063ff3
…cebook#1882)

Summary:

Kwargs: These were originally added to support passing around additional kwargs in subclasses that no-longer exist. They later silently took on the role of carrying the kwargs that gets passed down to model input constructors. The argument name has been updated with added docstring explaining what these do. These are now used to update `Surrogate.model_options` and passed to the input constructors from there.

Model fitting clean up: We had a bunch of duplicate logic for constructing the models, left over from the merger of `Surrogate` & `ListSurrogate`, which led to several bugs in the past and made the code much harder to maintain and review. This diff deduplicates and simplifies the model fitting logic.

Reviewed By: esantorella

Differential Revision: D49707895
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 63fdfd8.

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 Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants