Skip to content

Commit

Permalink
Update multitask.py (#2621)
Browse files Browse the repository at this point in the history
Summary:
fix bug in example

<!--
Thank you for sending the PR! We appreciate you spending the time to make BoTorch better.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to BoTorch here: https://github.com/pytorch/botorch/blob/main/CONTRIBUTING.md
-->

## Motivation

Improve documentation.

### Have you read the [Contributing Guidelines on pull requests](https://github.com/pytorch/botorch/blob/main/CONTRIBUTING.md#pull-requests)?

Yes

Pull Request resolved: #2621

Test Plan:
n/a

## Related PRs

n/a

Reviewed By: Balandat

Differential Revision: D65878578

Pulled By: saitcakmak

fbshipit-source-id: 05c222f81952974d3f4e11dc6f16d775e6ed23c2
  • Loading branch information
LeoIV authored and facebook-github-bot committed Nov 13, 2024
1 parent 5181cb8 commit 7cfff9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion botorch/models/multitask.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def __init__(
>>> train_X = torch.cat([
>>> torch.cat([X1, i1], -1), torch.cat([X2, i2], -1),
>>> ])
>>> train_Y = torch.cat(f1(X1), f2(X2)).unsqueeze(-1)
>>> train_Y = torch.cat([f1(X1), f2(X2)]).unsqueeze(-1)
>>> model = MultiTaskGP(train_X, train_Y, task_feature=-1)
"""
with torch.no_grad():
Expand Down

0 comments on commit 7cfff9c

Please sign in to comment.