Skip to content

Commit 4e3ac42

Browse files
timandrews335mfeurer
authored andcommitted
Issue #621 - better error messages on listing queries. Adding check for list type and return error message, take 2. (#666)
1 parent 6b5dfe6 commit 4e3ac42

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

openml/runs/functions.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,17 @@ def list_runs(offset=None, size=None, id=None, task=None, setup=None,
713713
List of found runs.
714714
"""
715715

716+
if id is not None and (not isinstance(id, list)):
717+
raise TypeError('id must be of type list.')
718+
if task is not None and (not isinstance(task, list)):
719+
raise TypeError('task must be of type list.')
720+
if setup is not None and (not isinstance(setup, list)):
721+
raise TypeError('setup must be of type list.')
722+
if flow is not None and (not isinstance(flow, list)):
723+
raise TypeError('flow must be of type list.')
724+
if uploader is not None and (not isinstance(uploader, list)):
725+
raise TypeError('uploader must be of type list.')
726+
716727
return openml.utils._list_all(
717728
_list_runs, offset=offset, size=size, id=id, task=task, setup=setup,
718729
flow=flow, uploader=uploader, tag=tag, display_errors=display_errors,

0 commit comments

Comments
 (0)