From 081ab8fe9a78d49cce4e9179dab268e8e4037e6c Mon Sep 17 00:00:00 2001 From: linznedd Date: Fri, 6 Oct 2023 15:35:25 +0200 Subject: [PATCH] fix init --- bofire/data_models/surrogates/polynomial.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/bofire/data_models/surrogates/polynomial.py b/bofire/data_models/surrogates/polynomial.py index 5503db11d..4c812a179 100644 --- a/bofire/data_models/surrogates/polynomial.py +++ b/bofire/data_models/surrogates/polynomial.py @@ -2,6 +2,8 @@ from pydantic import Field +from bofire.data_models.domain.api import Inputs, Outputs +from bofire.data_models.features.api import TInputTransformSpecs from bofire.data_models.kernels.api import ( PolynomialKernel, ) @@ -18,7 +20,22 @@ class PolynomialSurrogate(BotorchSurrogate, TrainableSurrogate): noise_prior: AnyPrior = Field(default_factory=lambda: BOTORCH_NOISE_PRIOR()) scaler: ScalerEnum = ScalerEnum.NORMALIZE - def __init__(self, power=2): + def __init__( + self, + type: str, + inputs: Inputs, + outputs: Outputs, + power: int, + input_preprocessing_specs: TInputTransformSpecs = dict, + dump: str | None = None, + ): + super().__init__( + type=type, + inputs=inputs, + outputs=outputs, + input_preprocessing_specs=input_preprocessing_specs, + dump=dump, + ) self.kernel: PolynomialKernel = Field( default_factory=lambda: PolynomialKernel(power=power) )