Skip to content

Commit ef73ea6

Browse files
jduerholtfacebook-github-bot
authored andcommitted
Add dtype torch.double to basic example on website (#2395)
Summary: <!-- 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 By chance, I encountered that there is no explicit dtype provided in the basic example on the botorch website, which then throws a warning when running the code, which I find kind of annoying. This PR just adds `dtype=torch.double` to the example, as it is also done for somehow the same code example in the `README.md` on github. ### Have you read the [Contributing Guidelines on pull requests](https://github.com/pytorch/botorch/blob/main/CONTRIBUTING.md#pull-requests)? Yes. Pull Request resolved: #2395 Test Plan: No additional tests needed. Reviewed By: Balandat Differential Revision: D59056278 Pulled By: esantorella fbshipit-source-id: 45786326d421e687482a038068bc4d6a21e9f84c
1 parent fac5faa commit ef73ea6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/pages/en/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ from botorch.fit import fit_gpytorch_mll
118118
from botorch.utils import standardize
119119
from gpytorch.mlls import ExactMarginalLogLikelihood
120120
121-
train_X = torch.rand(10, 2)
121+
train_X = torch.rand(10, 2, dtype=torch.double)
122122
Y = 1 - torch.linalg.norm(train_X - 0.5, dim=-1, keepdim=True)
123123
Y = Y + 0.1 * torch.randn_like(Y) # add some noise
124124
train_Y = standardize(Y)

0 commit comments

Comments
 (0)