Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added unit test to verify how the dataset object handles comparisons #981

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

ArlindKadra
Copy link
Member

Reference Issue

Fixes #577

What does this PR implement/fix? Explain your changes.

Adds unit test to verify the implemented comparison for the dataset object.

How should this PR be tested?

With the newly added unit test.

PGijsbers
PGijsbers previously approved these changes Oct 29, 2020
Copy link
Collaborator

@PGijsbers PGijsbers left a comment

Choose a reason for hiding this comment

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

👍

tests/test_datasets/test_dataset.py Outdated Show resolved Hide resolved
@PGijsbers PGijsbers dismissed their stale review October 29, 2020 12:38

I forgot to check the CI results. Have to investigate.

@PGijsbers
Copy link
Collaborator

I'll wait for Appveyor to complete. Github Actions seems to fail due to too high workload on the server. I will throttle the number of parallel jobs further in the next PR :/

@ArlindKadra
Copy link
Member Author

I'll wait for Appveyor to complete. Github Actions seems to fail due to too high workload on the server. I will throttle the number of parallel jobs further in the next PR :/

Yes, I also noticed that the Github Actions were failing, however, the tests that failed were not affected by the unit test added with what I saw. Let us wait for Appveyor.

@mfeurer
Copy link
Collaborator

mfeurer commented Oct 29, 2020

I just had a look at the attributes of the dataset, and while the test obviously works, I'm wondering whether a few other attributes should also be excluded from checking, and how we would best test that?

The attributes would be _dataset, data_pickle_file, data_feather_file, feather_attribute_file. Maybe one should automatically change one attribute at a time and check that the equals comparison still works as expected?

tests/test_datasets/test_dataset.py Outdated Show resolved Hide resolved
openml/datasets/dataset.py Outdated Show resolved Hide resolved
Comment on lines +299 to +302
"_dataset",
"data_pickle_file",
"data_feather_file",
"feather_attribute_file",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like to see these defined as a separate set (e.g. cache_fields), because these are not server fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unittest Dataset Equality
3 participants