Skip to content

Commit cd7b8a6

Browse files
committed
checked api diff
1 parent e502441 commit cd7b8a6

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/hyperactive/experiment/integrations/skforecast_forecasting.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,19 @@ def _paramnames(self):
185185
list of str
186186
The parameter names of the search parameters.
187187
"""
188-
return list(self.forecaster.get_params().keys())
188+
# Newer skforecast forecasters expose set_params but may not expose
189+
# get_params; in that case infer tunable names from wrapped estimator.
190+
if hasattr(self.forecaster, "get_params"):
191+
return list(self.forecaster.get_params().keys())
192+
193+
for attr in ("estimator", "regressor"):
194+
estimator = getattr(self.forecaster, attr, None)
195+
if estimator is not None and hasattr(estimator, "get_params"):
196+
return list(estimator.get_params().keys())
197+
198+
# Unknown parameter surface: allow BaseExperiment to accept arbitrary
199+
# params and delegate compatibility checks to forecaster.set_params.
200+
return None
189201

190202
def _evaluate(self, params):
191203
"""Evaluate the parameters.

0 commit comments

Comments
 (0)