From 10b55c318e84679c00d0bfa407dbc1ddee258c36 Mon Sep 17 00:00:00 2001 From: sahithyaravi Date: Fri, 5 Apr 2019 16:10:43 +0200 Subject: [PATCH 1/2] added upload time and error to list runs --- openml/runs/functions.py | 4 +++- tests/test_runs/test_run_functions.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/openml/runs/functions.py b/openml/runs/functions.py index 75206f7ab..32c6166c8 100644 --- a/openml/runs/functions.py +++ b/openml/runs/functions.py @@ -1183,7 +1183,9 @@ def __list_runs(api_call): 'task_id': int(run_['oml:task_id']), 'setup_id': int(run_['oml:setup_id']), 'flow_id': int(run_['oml:flow_id']), - 'uploader': int(run_['oml:uploader'])} + 'uploader': int(run_['oml:uploader']), + 'upload_time': str(run_['oml:upload_time']), + 'error_message': str((run_['oml:error_message']) or '')} runs[run_id] = run diff --git a/tests/test_runs/test_run_functions.py b/tests/test_runs/test_run_functions.py index 20f9ba1f7..98ea06379 100644 --- a/tests/test_runs/test_run_functions.py +++ b/tests/test_runs/test_run_functions.py @@ -1316,7 +1316,7 @@ def test_get_run(self): def _check_run(self, run): self.assertIsInstance(run, dict) - self.assertEqual(len(run), 5) + self.assertEqual(len(run), 7) def test_get_runs_list(self): # TODO: comes from live, no such lists on test @@ -1346,6 +1346,7 @@ def test_get_runs_list_by_task(self): task_ids.append(21) runs = openml.runs.list_runs(task=task_ids) + # print(runs) self.assertGreaterEqual(len(runs), num_runs + 1) for rid in runs: self.assertIn(runs[rid]['task_id'], task_ids) From e81a3d494c5a38bf520f187ee004b78b140a8e2b Mon Sep 17 00:00:00 2001 From: sahithyaravi Date: Fri, 5 Apr 2019 17:51:31 +0200 Subject: [PATCH 2/2] remove unnecessary comment --- tests/test_runs/test_run_functions.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_runs/test_run_functions.py b/tests/test_runs/test_run_functions.py index 98ea06379..398b33c06 100644 --- a/tests/test_runs/test_run_functions.py +++ b/tests/test_runs/test_run_functions.py @@ -1346,7 +1346,6 @@ def test_get_runs_list_by_task(self): task_ids.append(21) runs = openml.runs.list_runs(task=task_ids) - # print(runs) self.assertGreaterEqual(len(runs), num_runs + 1) for rid in runs: self.assertIn(runs[rid]['task_id'], task_ids)