-
Notifications
You must be signed in to change notification settings - Fork 321
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 botorch_model_class
to Surrogate._set_formatted_inputs
#2653
Conversation
This pull request was exported from Phabricator. Differential Revision: D61212316 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2653 +/- ##
=======================================
Coverage 95.28% 95.28%
=======================================
Files 493 493
Lines 47746 47746
=======================================
Hits 45497 45497
Misses 2249 2249 ☔ View full report in Codecov by Sentry. |
This pull request was exported from Phabricator. Differential Revision: D61212316 |
…book#2653) Summary: Pull Request resolved: facebook#2653 Context: `Surrogate._set_formatted_inputs` is used only in the following context: - A model input constructor sets inputs on the basis of a `botorch_model_class` and a `surrogate`. It checks which inputs are valid based on the `botorch_model_class` - The input constructor calls `_set_formatted_inputs`; if the inputs are not valid (as per the above bullet), it raises an exception. - However, `_set_formatted_inputs` uses `surrogate.botorch_model_class` rather than `botorch_model_class`, which may not be the same, and can raise a nonsensical error. Hence there was a unit test raising a puzzling exception that SaasFullyBayesianSingleTaskGP does not support `outcome_transform` (it does), when it should have been saying that `SingleTaskGPWithDifferentConstructor`, the model in question, doesn't support `outcome_transform`. This PR: - Passes `botorch_model_class` to `_set_formatted_inputs` - changes some `list` annotations to `Sequence` to fix type errors Reviewed By: Balandat Differential Revision: D61212316
9de5a1a
to
bbbb9a8
Compare
This pull request was exported from Phabricator. Differential Revision: D61212316 |
…book#2653) Summary: Pull Request resolved: facebook#2653 Context: `Surrogate._set_formatted_inputs` is used only in the following context: - A model input constructor sets inputs on the basis of a `botorch_model_class` and a `surrogate`. It checks which inputs are valid based on the `botorch_model_class` - The input constructor calls `_set_formatted_inputs`; if the inputs are not valid (as per the above bullet), it raises an exception. - However, `_set_formatted_inputs` uses `surrogate.botorch_model_class` rather than `botorch_model_class`, which may not be the same, and can raise a nonsensical error. Hence there was a unit test raising a puzzling exception that SaasFullyBayesianSingleTaskGP does not support `outcome_transform` (it does), when it should have been saying that `SingleTaskGPWithDifferentConstructor`, the model in question, doesn't support `outcome_transform`. This PR: - Passes `botorch_model_class` to `_set_formatted_inputs` - changes some `list` annotations to `Sequence` to fix type errors Reviewed By: Balandat Differential Revision: D61212316
bbbb9a8
to
acfa301
Compare
…book#2653) Summary: Pull Request resolved: facebook#2653 Context: `Surrogate._set_formatted_inputs` is used only in the following context: - A model input constructor sets inputs on the basis of a `botorch_model_class` and a `surrogate`. It checks which inputs are valid based on the `botorch_model_class` - The input constructor calls `_set_formatted_inputs`; if the inputs are not valid (as per the above bullet), it raises an exception. - However, `_set_formatted_inputs` uses `surrogate.botorch_model_class` rather than `botorch_model_class`, which may not be the same, and can raise a nonsensical error. Hence there was a unit test raising a puzzling exception that SaasFullyBayesianSingleTaskGP does not support `outcome_transform` (it does), when it should have been saying that `SingleTaskGPWithDifferentConstructor`, the model in question, doesn't support `outcome_transform`. This PR: - Passes `botorch_model_class` to `_set_formatted_inputs` - changes some `list` annotations to `Sequence` to fix type errors Reviewed By: Balandat Differential Revision: D61212316
This pull request was exported from Phabricator. Differential Revision: D61212316 |
acfa301
to
df186c5
Compare
This pull request has been merged in 310b43d. |
Summary:
Context:
Surrogate._set_formatted_inputs
is used only in the following context:botorch_model_class
and asurrogate
. It checks which inputs are valid based on thebotorch_model_class
_set_formatted_inputs
; if the inputs are not valid (as per the above bullet), it raises an exception._set_formatted_inputs
usessurrogate.botorch_model_class
rather thanbotorch_model_class
, which may not be the same, and can raise a nonsensical error. Hence there was a unit test raising a puzzling exception that SaasFullyBayesianSingleTaskGP does not supportoutcome_transform
(it does), when it should have been saying thatSingleTaskGPWithDifferentConstructor
, the model in question, doesn't supportoutcome_transform
.This PR:
botorch_model_class
to_set_formatted_inputs
list
annotations toSequence
to fix type errorsDifferential Revision: D61212316