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

fix docstring in ModelList #1573

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions botorch/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ def fantasize(
class ModelList(Model):
r"""A multi-output Model represented by a list of independent models.

All
BoTorch models are acceptable as inputs. The cost of this flexibility is
All BoTorch models are acceptable as inputs. The cost of this flexibility is
that `ModelList` does not support all methods that may be implemented by its
component models. One use case for `ModelList` is combining a regression
model and a deterministic model in one multi-output container model, e.g.
Expand All @@ -353,7 +352,7 @@ def __init__(self, *models: Model) -> None:
>>> m_1 = SingleTaskGP(train_X, train_Y)
>>> m_2 = GenericDeterministicModel(lambda x: x.sum(dim=-1))
>>> m_12 = ModelList(m_1, m_2)
>>> m_12.predict(test_X)
>>> m_12.posterior(test_X)
"""
super().__init__()
self.models = ModuleList(models)
Expand Down