Skip to content

Commit 0290e3d

Browse files
esantorellafacebook-github-bot
authored andcommitted
Update syntax of calls to optimize_acqf_mixed_alternating (#2943)
Summary: Pull Request resolved: #2943 X-link: facebook/Ax#4069 Ax: Update a call to `optimize_acqf_mixed_alternating` to match D79091028 / #2942 BoTorch: Update type annotations to clarify that the argument will not be mutated, allowing Pyre to pass for Ax. Reviewed By: saitcakmak Differential Revision: D79107891 fbshipit-source-id: bae5490e8493e7880d78e10b59cb1d89e8e34cfa
1 parent 2d5deba commit 0290e3d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

botorch/optim/optimize_mixed.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
import itertools
99
import random
1010
import warnings
11-
from typing import Any, Callable, Sequence
11+
from collections.abc import Mapping, Sequence
12+
from typing import Any, Callable
1213

1314
import torch
1415
from botorch.acquisition import AcquisitionFunction
@@ -807,8 +808,8 @@ def continuous_step(
807808
def optimize_acqf_mixed_alternating(
808809
acq_function: AcquisitionFunction,
809810
bounds: Tensor,
810-
discrete_dims: dict[int, list[float]] | None = None,
811-
cat_dims: dict[int, list[float]] | None = None,
811+
discrete_dims: Mapping[int, Sequence[float]] | None = None,
812+
cat_dims: Mapping[int, Sequence[float]] | None = None,
812813
options: dict[str, Any] | None = None,
813814
q: int = 1,
814815
raw_samples: int = RAW_SAMPLES,

0 commit comments

Comments
 (0)