File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
from __future__ import annotations
4
4
5
- from typing import TYPE_CHECKING , ClassVar , Optional
5
+ from typing import TYPE_CHECKING , ClassVar
6
6
7
7
from attr import define , field
8
8
12
12
from baybe .surrogates .base import Surrogate
13
13
14
14
if TYPE_CHECKING :
15
- from botorch .models import SingleTaskGP
16
15
from torch import Tensor
17
16
18
17
@@ -31,7 +30,9 @@ class GaussianProcessSurrogate(Surrogate):
31
30
kernel : Kernel = field (factory = MaternKernel )
32
31
"""The kernel used by the Gaussian Process."""
33
32
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 )
35
36
"""The actual model."""
36
37
37
38
def _posterior (self , candidates : Tensor ) -> tuple [Tensor , Tensor ]:
You can’t perform that action at this time.
0 commit comments