Closed saitcakmak closed 3 weeks ago
This pull request was exported from Phabricator. Differential Revision: D65338444
This pull request was exported from Phabricator. Differential Revision: D65338444
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.98%. Comparing base (
9ebead4
) to head (9c4581f
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This pull request has been merged in pytorch/botorch@3ca48d0ac5865a017ac6b2294807b432d6472bcf.
Summary:
InputTransform
s are required to betorch.nn.Module
subclasses but the base class does not inherit fromtorch.nn.Module
. This leads to type checker complaints when calling methods like.to(...)
, since it doesn't know that they areModule
s.This was originally motivated by the inheritance order of
Warp
transform, as we wantGPyTorchModule
methods to take precedence overtorch.nn.Module
. However, this not actually a concern since theGPyTorchModule
comes first in the MRO ofWarp
regardless of whetherInputTransform
inherits fromModule
(sinceGPyTorchModule
itself inherits fromModule
as well).This diff updates
InputTransform
to inherit fromModule
and removes the redundantModule
inheritance from subclasses.Differential Revision: D65338444