File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5- from typing import TYPE_CHECKING , ClassVar , Optional
5+ from typing import TYPE_CHECKING , ClassVar
66
77from attr import define , field
88
1212from baybe .surrogates .base import Surrogate
1313
1414if TYPE_CHECKING :
15- from botorch .models import SingleTaskGP
1615 from torch import Tensor
1716
1817
@@ -31,7 +30,9 @@ class GaussianProcessSurrogate(Surrogate):
3130 kernel : Kernel = field (factory = MaternKernel )
3231 """The kernel used by the Gaussian Process."""
3332
34- _model : Optional [SingleTaskGP ] = field (init = False , default = None )
33+ # TODO: type should be Optional[botorch.models.SingleTaskGP] but is currently
34+ # omitted due to: https://github.com/python-attrs/cattrs/issues/531
35+ _model = field (init = False , default = None )
3536 """The actual model."""
3637
3738 def _posterior (self , candidates : Tensor ) -> tuple [Tensor , Tensor ]:
You can’t perform that action at this time.
0 commit comments