-
Notifications
You must be signed in to change notification settings - Fork 383
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
Support model init kwargs in batch_cross_validation
; code quality improvements
#2269
Conversation
This pull request was exported from Phabricator. Differential Revision: D55572964 |
…hecks (pytorch#2268) Summary: - Deduplicated logic between the cases with and without noise observations - Broke up into subtests - Added checks for Yvar produced by cross-validation - Added checks for device and dtype of results Differential Revision: D55572962
…mprovements (pytorch#2269) Summary: Improvements to `batch_cross_validation`: * Support passing arbitrary keyword arguments onto the model input constructor, such as input and outcome transforms. This makes constructing the batch shape of the transforms awkward. A more natural solution might be to support only input and outcome transforms, not arbitrary keyword arguments, and to have the user pass class names and let BoTorch handle transform instantiation. However, this might not work for arbitrary transforms. * Stop passing train_Yvar=None when it is not needed, addressing pytorch#1669 * Stop using `filter_kwargs`, which was probably only there to deal with `train_Yvar`. Now incorrect keyword arguments will raise an exception. * Updated tutorial Differential Revision: D55572964
5b93f2a
to
ac41829
Compare
This pull request was exported from Phabricator. Differential Revision: D55572964 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2269 +/- ##
=======================================
Coverage 99.97% 99.97%
=======================================
Files 197 197
Lines 17148 17149 +1
=======================================
+ Hits 17144 17145 +1
Misses 4 4 ☔ View full report in Codecov by Sentry. |
This pull request has been merged in dc55a21. |
Summary: ## Motivation This tutorial somehow got mis-formatted in #2269. This fixes it. ### Have you read the [Contributing Guidelines on pull requests](https://github.com/pytorch/botorch/blob/main/CONTRIBUTING.md#pull-requests)? Yes Pull Request resolved: #2279 Test Plan: - Tutorial should look okay - CI should be able to execute it - ## Related PRs #2269 Reviewed By: Balandat Differential Revision: D55696979 Pulled By: esantorella fbshipit-source-id: 0f502cab99077b6e10cb7296322ea4a275034331
Summary:
Improvements to
batch_cross_validation
:batch_cross_validation
should not always passtrain_Yvar
to the model #1669filter_kwargs
, which was probably only there to deal withtrain_Yvar
. Now incorrect keyword arguments will raise an exception.Differential Revision: D55572964