Skip to content

Commit 5fb3518

Browse files
committed
Fix disable_all_algorithms for predictions
1 parent ef3ab6c commit 5fb3518

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

dataikuapi/dss/ml.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,12 @@ def set_algorithm_enabled(self, algorithm_name, enabled):
250250

251251
def disable_all_algorithms(self):
252252
"""Disables all algorithms"""
253-
254-
for algorithm_name in self.__class__.algorithm_remap.keys():
255-
key = self.__class__.algorithm_remap[algorithm_name]
253+
for algorithm_key in self.__class__.algorithm_remap.keys():
254+
algorithm_meta = self.__class__.algorithm_remap[algorithm_key]
255+
if isinstance(algorithm_meta, PredictionAlgorithmMeta):
256+
key = algorithm_meta.algorithm_name
257+
else:
258+
key = algorithm_meta
256259
if key in self.mltask_settings["modeling"]:
257260
self.mltask_settings["modeling"][key]["enabled"] = False
258261

0 commit comments

Comments
 (0)