Skip to content

Commit fa68963

Browse files
committed
Fix small bug in DSSPredictionMLTaskSettings __init__
1 parent 9afe24c commit fa68963

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dataikuapi/dss/ml.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,8 +1429,9 @@ class PredictionTypes:
14291429
def __init__(self, client, project_key, analysis_id, mltask_id, mltask_settings):
14301430
DSSMLTaskSettings.__init__(self, client, project_key, analysis_id, mltask_id, mltask_settings)
14311431

1432-
if self.get_prediction_type() not in [self.PredictionTypes.BINARY, self.PredictionTypes.REGRESSION, self.PredictionTypes.MULTICLASS]:
1433-
raise ValueError("Unknown prediction type: {}".format(self.prediction_type))
1432+
prediction_type = self.get_prediction_type()
1433+
if prediction_type not in [self.PredictionTypes.BINARY, self.PredictionTypes.REGRESSION, self.PredictionTypes.MULTICLASS]:
1434+
raise ValueError("Unknown prediction type: {}".format(prediction_type))
14341435

14351436
self.classification_prediction_types = [self.PredictionTypes.BINARY, self.PredictionTypes.MULTICLASS]
14361437

0 commit comments

Comments
 (0)