Skip to content

Commit 1625a23

Browse files
AdrianSosicmeta-codesync[bot]
authored andcommitted
Add missing int cast (#3062)
Summary: Fixes #3061 Pull Request resolved: #3062 Reviewed By: saitcakmak Differential Revision: D85436183 Pulled By: Balandat fbshipit-source-id: a493ad00d57a9f8722537e48d2e5487a1938af15
1 parent 04eb97a commit 1625a23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

botorch/sampling/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ def __init__(
6060
f"got {sample_shape}."
6161
)
6262
self.sample_shape = sample_shape
63-
self.seed = seed if seed is not None else torch.randint(0, 1000000, (1,)).item()
63+
self.seed = (
64+
seed if seed is not None else int(torch.randint(0, 1000000, (1,)).item())
65+
)
6466
self.register_buffer("base_samples", None)
6567

6668
@abstractmethod

0 commit comments

Comments
 (0)