Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0639882
Merge pull request #1274 from openml/develop
PGijsbers Jul 20, 2023
12c3d30
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 1, 2023
2397231
Raise correct TypeError and improve type check
PGijsbers Aug 1, 2023
2801e9d
Type check with isinstance instead of type() ==
PGijsbers Aug 1, 2023
241608a
Docker enhancement #1277 (#1278)
PGijsbers Aug 15, 2023
1cc1169
fix: carefully replaced minio_url with parquet_url (#1280)
varshneydevansh Aug 17, 2023
5dc10b6
Pytest/utils (#1269)
PGijsbers Sep 20, 2023
895aefa
Documented remaining Attributes of classes and functions (#1283)
v-parmar Oct 31, 2023
8a039ed
[pre-commit.ci] pre-commit autoupdate (#1281)
pre-commit-ci[bot] Nov 14, 2023
abf7caa
[pre-commit.ci] pre-commit autoupdate (#1291)
pre-commit-ci[bot] Jan 2, 2024
2547217
Bump actions/checkout from 3 to 4 (#1284)
dependabot[bot] Jan 2, 2024
8014987
Bump docker/login-action from 2 to 3 (#1285)
dependabot[bot] Jan 2, 2024
e340838
Bump docker/metadata-action from 4 to 5 (#1286)
dependabot[bot] Jan 2, 2024
015f3cd
Bump docker/setup-qemu-action from 2 to 3 (#1287)
dependabot[bot] Jan 2, 2024
0d100db
Bump docker/build-push-action from 4 to 5 (#1288)
dependabot[bot] Jan 2, 2024
c186c64
Add more type annotations (#1261)
mfeurer Jan 2, 2024
f750f99
Bump docker/setup-buildx-action from 2 to 3 (#1292)
dependabot[bot] Jan 4, 2024
fe5403a
Bump actions/setup-python from 4 to 5 (#1293)
dependabot[bot] Jan 4, 2024
0eb0b72
Rework Tagging Tests for New Server Specification (#1294)
LennartPurucker Jan 5, 2024
054ec33
ci: Update tooling (#1298)
eddiebergman Jan 8, 2024
ee1231b
ci: Disable 3.6 tests (#1302)
eddiebergman Jan 8, 2024
b217a3f
fix: Chipping away at ruff lints (#1303)
eddiebergman Jan 8, 2024
88cfa21
Tagging constraints (#1305)
janvanrijn Jan 9, 2024
3c5a4c0
[pre-commit.ci] pre-commit autoupdate (#1306)
pre-commit-ci[bot] Jan 9, 2024
c771a78
Linting Everything - Fix All mypy and ruff Errors (#1307)
LennartPurucker Jan 9, 2024
6e13e85
ci: Remove Python 3.6/7 (#1308)
eddiebergman Jan 9, 2024
1b27d14
ci: remove 3.7 patch (#1309)
LennartPurucker Jan 10, 2024
bd193bb
Make Test Work Again After Ruff and Linter Changes (#1310)
LennartPurucker Jan 12, 2024
18ead2f
Add Feature Descriptions Rebase Clean (#1316)
LennartPurucker Jan 12, 2024
c93b022
Make Class Label Retrieval More Lenient (#1315)
LennartPurucker Jan 12, 2024
a7cb9a5
[pre-commit.ci] pre-commit autoupdate (#1318)
pre-commit-ci[bot] Jan 15, 2024
f730ebc
Fix: update fetching a bucket from MinIO (#1314)
eddiebergman Jan 17, 2024
d3f9de6
Update progress.rst for minor release (#1319)
LennartPurucker Jan 18, 2024
1d26ad5
Prepare Develop for Merge with Main (#1321)
LennartPurucker Jan 18, 2024
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
Type check with isinstance instead of type() ==
  • Loading branch information
PGijsbers authored and eddiebergman committed Jan 18, 2024
commit 2801e9d8705fbbe360739dfd49a60a884b9ed2c1
4 changes: 3 additions & 1 deletion openml/datasets/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ def __list_datasets(api_call, output_format="dict"):
datasets_dict = xmltodict.parse(xml_string, force_list=("oml:dataset",))

# Minimalistic check if the XML is useful
assert type(datasets_dict["oml:data"]["oml:dataset"]) == list, type(datasets_dict["oml:data"])
assert isinstance(datasets_dict["oml:data"]["oml:dataset"], list), type(
datasets_dict["oml:data"]
)
assert datasets_dict["oml:data"]["@xmlns:oml"] == "http://openml.org/openml", datasets_dict[
"oml:data"
]["@xmlns:oml"]
Expand Down
2 changes: 1 addition & 1 deletion openml/evaluations/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def __list_evaluations(api_call, output_format="object"):
"Error in return XML, does not contain " '"oml:evaluations": %s' % str(evals_dict)
)

assert type(evals_dict["oml:evaluations"]["oml:evaluation"]) == list, type(
assert isinstance(evals_dict["oml:evaluations"]["oml:evaluation"], list), type(
evals_dict["oml:evaluations"]
)

Expand Down
2 changes: 1 addition & 1 deletion openml/flows/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def __list_flows(api_call: str, output_format: str = "dict") -> Union[Dict, pd.D
flows_dict = xmltodict.parse(xml_string, force_list=("oml:flow",))

# Minimalistic check if the XML is useful
assert type(flows_dict["oml:flows"]["oml:flow"]) == list, type(flows_dict["oml:flows"])
assert isinstance(flows_dict["oml:flows"]["oml:flow"], list), type(flows_dict["oml:flows"])
assert flows_dict["oml:flows"]["@xmlns:oml"] == "http://openml.org/openml", flows_dict[
"oml:flows"
]["@xmlns:oml"]
Expand Down
2 changes: 1 addition & 1 deletion openml/runs/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ def __list_runs(api_call, output_format="dict"):
'"http://openml.org/openml": %s' % str(runs_dict)
)

assert type(runs_dict["oml:runs"]["oml:run"]) == list, type(runs_dict["oml:runs"])
assert isinstance(runs_dict["oml:runs"]["oml:run"], list), type(runs_dict["oml:runs"])

runs = OrderedDict()
for run_ in runs_dict["oml:runs"]["oml:run"]:
Expand Down
2 changes: 1 addition & 1 deletion openml/setups/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def __list_setups(api_call, output_format="object"):
'"%s": %s' % (openml_uri, str(setups_dict))
)

assert type(setups_dict["oml:setups"]["oml:setup"]) == list, type(setups_dict["oml:setups"])
assert isinstance(setups_dict["oml:setups"]["oml:setup"], list), type(setups_dict["oml:setups"])

setups = dict()
for setup_ in setups_dict["oml:setups"]["oml:setup"]:
Expand Down
2 changes: 1 addition & 1 deletion openml/study/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def __list_studies(api_call, output_format="object") -> Union[Dict, pd.DataFrame
study_dict = xmltodict.parse(xml_string, force_list=("oml:study",))

# Minimalistic check if the XML is useful
assert type(study_dict["oml:study_list"]["oml:study"]) == list, type(
assert isinstance(study_dict["oml:study_list"]["oml:study"], list), type(
study_dict["oml:study_list"]
)
assert study_dict["oml:study_list"]["@xmlns:oml"] == "http://openml.org/openml", study_dict[
Expand Down
2 changes: 1 addition & 1 deletion openml/tasks/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def __list_tasks(api_call, output_format="dict"):
'"http://openml.org/openml": %s' % str(tasks_dict)
)

assert type(tasks_dict["oml:tasks"]["oml:task"]) == list, type(tasks_dict["oml:tasks"])
assert isinstance(tasks_dict["oml:tasks"]["oml:task"], list), type(tasks_dict["oml:tasks"])

tasks = dict()
procs = _get_estimation_procedure_list()
Expand Down
2 changes: 1 addition & 1 deletion openml/tasks/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, name, description, split):

def __eq__(self, other):
if (
type(self) != type(other)
(not isinstance(self, type(other)))
or self.name != other.name
or self.description != other.description
or self.split.keys() != other.split.keys()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_runs/test_run_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _assert_predictions_equal(self, predictions, predictions_prime):
for col_idx in compare_slice:
val_1 = predictions["data"][idx][col_idx]
val_2 = predictions_prime["data"][idx][col_idx]
if type(val_1) == float or type(val_2) == float:
if isinstance(val_1, float) or isinstance(val_2, float):
self.assertAlmostEqual(
float(val_1),
float(val_2),
Expand Down