31
31
32
32
33
33
class PiecewiseLinearGPSurrogateHyperconfig (Hyperconfig ):
34
- type : Literal [
34
+ type : Literal ["PiecewiseLinearGPSurrogateHyperconfig" ] = ( # type: ignore
35
35
"PiecewiseLinearGPSurrogateHyperconfig"
36
- ] = "PiecewiseLinearGPSurrogateHyperconfig"
36
+ )
37
37
inputs : Inputs = Inputs (
38
38
features = [
39
39
CategoricalInput (
@@ -44,9 +44,9 @@ class PiecewiseLinearGPSurrogateHyperconfig(Hyperconfig):
44
44
]
45
45
)
46
46
target_metric : RegressionMetricsEnum = RegressionMetricsEnum .MAE
47
- hyperstrategy : Literal [
48
- "FactorialStrategy" , "SoboStrategy" , "RandomStrategy"
49
- ] = "FactorialStrategy"
47
+ hyperstrategy : Literal ["FactorialStrategy" , "SoboStrategy" , "RandomStrategy" ] = (
48
+ "FactorialStrategy"
49
+ )
50
50
51
51
@staticmethod
52
52
def _update_hyperparameters (
@@ -112,7 +112,7 @@ class PiecewiseLinearGPSurrogate(TrainableBotorchSurrogate):
112
112
hyperconfig: The hyperconfig that is used for training the GP.
113
113
"""
114
114
115
- type : Literal ["PiecewiseLinearGPSurrogate" ] = "PiecewiseLinearGPSurrogate"
115
+ type : Literal ["PiecewiseLinearGPSurrogate" ] = "PiecewiseLinearGPSurrogate" # type: ignore
116
116
interpolation_range : Bounds
117
117
n_interpolation_points : PositiveInt = 1000
118
118
x_keys : list [str ]
@@ -122,7 +122,7 @@ class PiecewiseLinearGPSurrogate(TrainableBotorchSurrogate):
122
122
append_x : Annotated [List [float ], AfterValidator (validate_monotonically_increasing )]
123
123
prepend_y : Annotated [List [float ], AfterValidator (validate_monotonically_increasing )]
124
124
append_y : Annotated [List [float ], AfterValidator (validate_monotonically_increasing )]
125
- hyperconfig : Optional [PiecewiseLinearGPSurrogateHyperconfig ] = Field (
125
+ hyperconfig : Optional [PiecewiseLinearGPSurrogateHyperconfig ] = Field ( # type: ignore
126
126
default_factory = lambda : PiecewiseLinearGPSurrogateHyperconfig ()
127
127
)
128
128
0 commit comments