Skip to content

Commit a9e4742

Browse files
committed
Add Error when trying to set strategy (global) from specific PredictionAlgorithmSettings
1 parent 45b63ab commit a9e4742

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

dataikuapi/dss/ml.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,11 @@ def enabled(self, enabled):
821821
def strategy(self):
822822
return self._hyperparameter_search_params["strategy"]
823823

824+
@strategy.setter
825+
def strategy(self, _):
826+
raise AttributeError("The strategy must be set at the MLTask level.\n"
827+
"To update the search strategy, please use the setter of the HyperparameterSearchSettings "
828+
"object obtained with DSSPredictionMLTaskSettings.get_hyperparameter_search_settings method")
824829

825830
class RandomForestSettings(PredictionAlgorithmSettings):
826831

0 commit comments

Comments
 (0)