Skip to content

Commit

Permalink
Silence mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianSosic committed Sep 6, 2024
1 parent 4120fbb commit 591381b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions baybe/surrogates/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ def _posterior_comp(self, candidates_comp: Tensor, /) -> Posterior:
The same :class:`botorch.posteriors.Posterior` object as returned via
:meth:`baybe.surrogates.base.Surrogate.posterior`.
"""
# FIXME[typing]: It seems there is currently no better way to inform the type
# checker that the attribute is available at the time of the function call
assert self._input_scaler is not None

p = self._posterior(self._input_scaler.transform(candidates_comp))
if self._output_scaler is not _IDENTITY_TRANSFORM:
p = self._output_scaler.untransform_posterior(p)
Expand Down

0 comments on commit 591381b

Please sign in to comment.