Skip to content

Commit a4ec4bc

Browse files
change from raise error to warning for bad tasks (#1244)
1 parent f43e075 commit a4ec4bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

openml/tasks/functions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,10 @@ def __list_tasks(api_call, output_format="dict"):
288288
tasks[tid] = task
289289
except KeyError as e:
290290
if tid is not None:
291-
raise KeyError("Invalid xml for task %d: %s\nFrom %s" % (tid, e, task_))
291+
warnings.warn("Invalid xml for task %d: %s\nFrom %s" % (tid, e, task_))
292292
else:
293-
raise KeyError("Could not find key %s in %s!" % (e, task_))
293+
warnings.warn("Could not find key %s in %s!" % (e, task_))
294+
continue
294295

295296
if output_format == "dataframe":
296297
tasks = pd.DataFrame.from_dict(tasks, orient="index")

0 commit comments

Comments
 (0)