Add custom method with model_config to choose_gs#4727
Closed
saitcakmak wants to merge 2 commits intofacebook:mainfrom
Closed
Add custom method with model_config to choose_gs#4727saitcakmak wants to merge 2 commits intofacebook:mainfrom
saitcakmak wants to merge 2 commits intofacebook:mainfrom
Conversation
|
@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D89906836. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4727 +/- ##
==========================================
- Coverage 96.72% 96.71% -0.01%
==========================================
Files 582 582
Lines 60694 60764 +70
==========================================
+ Hits 58705 58770 +65
- Misses 1989 1994 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary: Simplifies common checks for num initialization trials etc that we do for node based GS Differential Revision: D89932177 Privacy Context Container: L1307644
Summary: This diff adds the ability to use custom `ModelConfig` objects and a custom `botorch_acqf_class` with `choose_generation_strategy` by introducing a new `"custom"` method option. ## Motivation After D83062555, the internal `choose_gs_internal` function now uses the OSS `choose_generation_strategy` for default GS dispatch. However, there was no way to pass custom model configurations (like MAP SAAS) through this function - they had to be handled as special cases outside the dispatch flow. ## Solution Rather than adding specific method types for each model variant (which would turn the Literal type into a "zoo" of options), we add a single `"custom"` method that allows passing a `ModelConfig` as a separate function argument. This keeps the API clean while providing full flexibility. Key changes: - Add `"custom"` to the `method` Literal type in `GenerationStrategyDispatchStruct` - Add optional `model_config` parameter to `choose_generation_strategy()` - Add validation: `model_config` must be provided iff `method="custom"` - Update `_get_mbm_node()` to handle custom model configs Differential Revision: D89906836
91099b4 to
952f070
Compare
|
This pull request has been merged in d740cb4. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This diff adds the ability to use custom
ModelConfigobjects withchoose_generation_strategyby introducing a new"custom"method option.Motivation
After D83062555, the internal
choose_gs_internalfunction now uses the OSSchoose_generation_strategyfor default GS dispatch. However, there was no way to pass custom model configurations (like MAP SAAS) through this function - they had to be handled as special cases outside the dispatch flow.Solution
Rather than adding specific method types for each model variant (which would turn the Literal type into a "zoo" of options), we add a single
"custom"method that allows passing aModelConfigas a separate function argument. This keeps the API clean while providing full flexibility.Key changes:
"custom"to themethodLiteral type inGenerationStrategyDispatchStructmodel_configparameter tochoose_generation_strategy()model_configmust be provided iffmethod="custom"_get_mbm_node()to handle custom model configsDifferential Revision: D89906836