Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
30dd55f
Add deprecation warning for retrieving dict
PGijsbers Jun 15, 2023
b502312
Refactor check_datasets_active to work with dataframe
PGijsbers Jun 15, 2023
357bb7d
Update unit tests to use list_datasets with output_format dataframe
PGijsbers Jun 15, 2023
29bbb57
Move list_datasets test to proper file
PGijsbers Jun 15, 2023
464e5dd
Remove list_datasets test, duplicate in test_datasets_functions
PGijsbers Jun 15, 2023
aaad25f
Update list_flows calls to use output_format='dataframe'
PGijsbers Jun 15, 2023
cf9dd7b
Update list_runs calls to require dataframe output
PGijsbers Jun 15, 2023
13f2fb5
Update list_setup calls for deprecation
PGijsbers Jun 15, 2023
d3342a1
Update list_study calls
PGijsbers Jun 15, 2023
b8a915b
Update list_tasks to specify output_format dataframe
PGijsbers Jun 15, 2023
3361b15
Add `output_format` to `list_datasets` call
PGijsbers Jun 15, 2023
be16355
Add TODO markers for removing `dict` support of `list_*` functions
PGijsbers Jun 15, 2023
5cc1287
Make status check less strict, call list_dataset with output_format
PGijsbers Jun 15, 2023
576e09c
Change index on id to did, since thats the dataset id's column name
PGijsbers Jun 15, 2023
b82febe
Update test to reflect new error message
PGijsbers Jun 15, 2023
cc944b5
Fix bug introduced by refactor
PGijsbers Jun 15, 2023
dca2590
Fix minor oversights of refactoring
PGijsbers Jun 15, 2023
5240504
Merge branch 'develop' into pandas_default
PGijsbers Jun 15, 2023
3cff453
Rename variables to reflect they are no longer lists
PGijsbers Jun 16, 2023
c130c41
Fix unsafe indexing on dataframe and remaining unit tests
PGijsbers Jun 16, 2023
22a6dd3
Perform safer check for integer dtypes
PGijsbers Jun 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix minor oversights of refactoring
  • Loading branch information
PGijsbers committed Jun 15, 2023
commit dca25909744e819c4e5fef5bf527fed4376164bd
1 change: 1 addition & 0 deletions tests/test_runs/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class TestRun(TestBase):

def test_tagging(self):
runs = openml.runs.list_runs(size=1, output_format="dataframe")
assert not runs.empty, "Test server state is incorrect"
run_id = runs["run_id"].iloc[0]
run = openml.runs.get_run(run_id)
tag = "testing_tag_{}_{}".format(self.id(), time())
Expand Down
4 changes: 2 additions & 2 deletions tests/test_runs/test_run_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ def test_get_runs_list_by_task(self):
task_ids.append(21)
runs = openml.runs.list_runs(task=task_ids, output_format="dataframe")
self.assertGreaterEqual(len(runs), num_runs + 1)
for run in runs.to_dict(orient="index"):
for run in runs.to_dict(orient="index").values():
self.assertIn(run["task_id"], task_ids)
self._check_run(run)

Expand All @@ -1405,7 +1405,7 @@ def test_get_runs_list_by_uploader(self):

runs = openml.runs.list_runs(uploader=uploader_ids, output_format="dataframe")
self.assertGreaterEqual(len(runs), 2)
for run in runs.to_dict(orient="index"):
for run in runs.to_dict(orient="index").values():
self.assertIn(run["uploader"], uploader_ids)
self._check_run(run)
num_runs = len(runs)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tasks/test_task_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_list_tasks_by_tag(self):
num_basic_tasks = 100 # number is flexible, check server if fails
tasks = openml.tasks.list_tasks(tag="OpenML100", output_format="dataframe")
self.assertGreaterEqual(len(tasks), num_basic_tasks)
for task in tasks.to_dict(orient="index"):
for task in tasks.to_dict(orient="index").values():
self._check_task(task)

def test_list_tasks(self):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def test_list_all_for_datasets(self):
)

self.assertEqual(len(datasets), required_size)
for did in datasets:
self._check_dataset(datasets[did])
for dataset in datasets.to_dict(orient="index").values():
self._check_dataset(dataset)

def test_list_all_for_tasks(self):
required_size = 1068 # default test server reset value
Expand Down