Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't raise specious warning about input transforms with approximate …
…GPs (#1826) Summary: ## Motivation The BoTorch base `Model` class warns if an input transform has been provided, the `eval` method is called, and the object has no `train_inputs` attribute. This is not appropriate for `ApproximateGPyTorchModel`s; see #1824 . This PR gives `ApproximateGPyTorchModel` the `train` and `eval` modes from `torch.nn.Module`, which is the same as the methods it had been inheriting from `Model` but without the irrelevant input transform logic. A nicer fix would be to remove the input transform logic from `Model` and have it only in subclasses that it applies to, so that subclasses like `ApproximateGPyTorchModel` would not need to do anything special to avoid inheriting that. I think this all applies to `EnsembleModel`s as well as `ApproximateGPyTorchModel`s --looking into this now. ### Have you read the [Contributing Guidelines on pull requests](https://github.com/pytorch/botorch/blob/main/CONTRIBUTING.md#pull-requests)? Pull Request resolved: #1826 Test Plan: Existing units for `ApproximateGPyTorchModel` look good. Reviewed By: Balandat Differential Revision: D45782048 Pulled By: esantorella fbshipit-source-id: 2091956a5a0cb6680f4c7292c0951f9079975ffb
- Loading branch information