Closed saitcakmak closed 1 year ago
Since GPyTorch models do not define a consistent num_outputs attribute, I don't see an easy way of correcting this.
Would it make sense to upstream some of the num_outputs
conventions & machinery we use in botorch to gpytorch? I guess right now this wouldn't bring additional immediate benefits, but this could be useful for some folks.
Something to think about down the road I guess.
IndependentModelList.num_outputs
makes a strong assumption that the underlying models are single-output, so it returns the # of sub-models. However,IndependentModelList
works perfectly fine with multi-output sub-models, leading to thenum_outputs
attribute returning the wrong value. Since GPyTorch models do not define a consistentnum_outputs
attribute, I don't see an easy way of correcting this.This becomes an issue in BoTorch where
ModelListGP
hasIndependentModelList
ahead ofModelList
in its MRO, which correctly definesnum_outputs
as the sum ofnum_outputs
of the sub-models. Removing the property fromIndependentModelList
should allow us to use the correct definition fromModelList
.