From b7258c898d737667ebe4143ce104dc7619f25889 Mon Sep 17 00:00:00 2001 From: Sebastian Ament Date: Thu, 10 Aug 2023 16:07:53 -0700 Subject: [PATCH] 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 --- botorch/acquisition/multi_step_lookahead.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/botorch/acquisition/multi_step_lookahead.py b/botorch/acquisition/multi_step_lookahead.py index 95637ad305..8744962665 100644 --- a/botorch/acquisition/multi_step_lookahead.py +++ b/botorch/acquisition/multi_step_lookahead.py @@ -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, @@ -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]: