Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
6 changes: 6 additions & 0 deletions openml/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from typing import Dict
import unittest
import warnings
import sklearn
from distutils.version import LooseVersion

# Currently, importing oslo raises a lot of warning that it will stop working
# under python3.8; remove this once they disappear
Expand Down Expand Up @@ -223,6 +225,10 @@ def _check_fold_timing_evaluations(
"wall_clock_time_millis_testing": (0, max_time_allowed),
"wall_clock_time_millis": (0, max_time_allowed),
}
if LooseVersion(sklearn.__version__) >= "0.23":
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it these can't/don't need to get tested?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a placeholder check since there was only one unit test which had a slightly different failure point.

Looked into it and had to make this change to account for this change in K-means in scikit-learn 0.23.1

Not sure if this is the most scalable, long-standing solution.

del check_measures["usercpu_time_millis_testing"]
del check_measures["usercpu_time_millis"]
del check_measures["usercpu_time_millis_training"]

if check_scores:
if task_type in (TaskTypeEnum.SUPERVISED_CLASSIFICATION, TaskTypeEnum.LEARNING_CURVE):
Expand Down
Loading