Skip to content

Commit b7258c8

Browse files
SebastianAmentfacebook-github-bot
authored andcommitted
Type signature fix for private methods of qMultiStepLookahead
Summary: `posterior_transform` is `Optional` in the constructor of the acquisition function, so it should be optional in the private methods as well. Reviewed By: saitcakmak Differential Revision: D48244486 fbshipit-source-id: f0850ecde5259d626cacbacd8c36401483a69d15
1 parent 0a1cfbe commit b7258c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

botorch/acquisition/multi_step_lookahead.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def _step(
322322
valfunc_argfacs: List[Optional[TAcqfArgConstructor]],
323323
inner_samplers: List[Optional[MCSampler]],
324324
objective: MCAcquisitionObjective,
325-
posterior_transform: PosteriorTransform,
325+
posterior_transform: Optional[PosteriorTransform],
326326
running_val: Optional[Tensor] = None,
327327
sample_weights: Optional[Tensor] = None,
328328
step_index: int = 0,
@@ -427,7 +427,7 @@ def _compute_stage_value(
427427
valfunc_cls: Optional[Type[AcquisitionFunction]],
428428
X: Tensor,
429429
objective: MCAcquisitionObjective,
430-
posterior_transform: PosteriorTransform,
430+
posterior_transform: Optional[PosteriorTransform],
431431
inner_sampler: Optional[MCSampler] = None,
432432
arg_fac: Optional[TAcqfArgConstructor] = None,
433433
) -> Optional[Tensor]:

0 commit comments

Comments
 (0)