@@ -755,7 +755,12 @@ def _run_task_get_arffcontent_parallel_helper( # noqa: PLR0913
755755 test_x = None
756756 test_y = None
757757 else :
758- raise NotImplementedError (task .task_type )
758+ raise NotImplementedError (
759+ f"Task type '{ task .task_type } ' is not supported. "
760+ f"Only OpenMLSupervisedTask and OpenMLClusteringTask are currently implemented. "
761+ f"Task details: task_id={ getattr (task , 'task_id' , 'unknown' )} , "
762+ f"task_class={ task .__class__ .__name__ } "
763+ )
759764
760765 config .logger .info (
761766 f"Going to run model { model !s} on "
@@ -982,7 +987,13 @@ def obtain_field(xml_obj, fieldname, from_server, cast=None): # type: ignore
982987 if "predictions" not in files and from_server is True :
983988 task = openml .tasks .get_task (task_id )
984989 if task .task_type_id == TaskType .SUBGROUP_DISCOVERY :
985- raise NotImplementedError ("Subgroup discovery tasks are not yet supported." )
990+ raise NotImplementedError (
991+ f"Subgroup discovery tasks are not yet supported. "
992+ f"Task ID: { task_id } . Please check the OpenML documentation"
993+ f"for supported task types. "
994+ f"Currently supported task types: Classification, Regression,"
995+ f"Clustering, and Learning Curve."
996+ )
986997
987998 # JvR: actually, I am not sure whether this error should be raised.
988999 # a run can consist without predictions. But for now let's keep it
@@ -1282,7 +1293,12 @@ def format_prediction( # noqa: PLR0913
12821293 if isinstance (task , OpenMLRegressionTask ):
12831294 return [repeat , fold , index , prediction , truth ]
12841295
1285- raise NotImplementedError (f"Formatting for { type (task )} is not supported." )
1296+ raise NotImplementedError (
1297+ f"Formatting for { type (task )} is not supported."
1298+ f"Supported task types: OpenMLClassificationTask, OpenMLRegressionTask,"
1299+ f"and OpenMLLearningCurveTask. "
1300+ f"Please ensure your task is one of these types."
1301+ )
12861302
12871303
12881304def delete_run (run_id : int ) -> bool :
0 commit comments