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

Support model init kwargs in batch_cross_validation; code quality improvements #2269

Closed
wants to merge 2 commits into from

Commits on Mar 31, 2024

  1. Make cross-validation test less repetitive and add device and dtype c…

    …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
    esantorella authored and facebook-github-bot committed Mar 31, 2024
    Configuration menu
    Copy the full SHA
    aeb72d3 View commit details
    Browse the repository at this point in the history
  2. Support model init kwargs in batch_cross_validation; code quality i…

    …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
    esantorella authored and facebook-github-bot committed Mar 31, 2024
    Configuration menu
    Copy the full SHA
    ac41829 View commit details
    Browse the repository at this point in the history