Skip to content

Commit

Permalink
Type signature fix for private methods of qMultiStepLookahead
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SebastianAment authored and facebook-github-bot committed Aug 10, 2023
1 parent 0a1cfbe commit b7258c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions botorch/acquisition/multi_step_lookahead.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def _step(
valfunc_argfacs: List[Optional[TAcqfArgConstructor]],
inner_samplers: List[Optional[MCSampler]],
objective: MCAcquisitionObjective,
posterior_transform: PosteriorTransform,
posterior_transform: Optional[PosteriorTransform],
running_val: Optional[Tensor] = None,
sample_weights: Optional[Tensor] = None,
step_index: int = 0,
Expand Down Expand Up @@ -427,7 +427,7 @@ def _compute_stage_value(
valfunc_cls: Optional[Type[AcquisitionFunction]],
X: Tensor,
objective: MCAcquisitionObjective,
posterior_transform: PosteriorTransform,
posterior_transform: Optional[PosteriorTransform],
inner_sampler: Optional[MCSampler] = None,
arg_fac: Optional[TAcqfArgConstructor] = None,
) -> Optional[Tensor]:
Expand Down

0 comments on commit b7258c8

Please sign in to comment.