Skip to content

Add tests for the STL10 dataset #3345

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

Merged
merged 5 commits into from
Feb 4, 2021
Merged

Add tests for the STL10 dataset #3345

merged 5 commits into from
Feb 4, 2021

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Feb 3, 2021

No description provided.

root, data = places365

dataset = torchvision.datasets.Places365(root, download=True)
self.assertIsInstance(repr(dataset), str)


class STL10Tester(DatasetTestcase):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

After adding the tests for Places365 we agreed on creating a separate test case for a dataset if more than the generics are checked

@@ -28,7 +30,7 @@
HAS_PYAV = False


class Tester(unittest.TestCase):
class DatasetTestcase(unittest.TestCase):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was necessary since STL10Tester needs access to generic_classification_dataset_test without subclassing Tester directly. Otherwise running STL10Tester would also run all inherited test.

@pmeier pmeier mentioned this pull request Feb 3, 2021
@pmeier pmeier requested a review from datumbox February 3, 2021 17:00
Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@fmassa fmassa merged commit bda17dd into pytorch:master Feb 4, 2021
facebook-github-bot pushed a commit that referenced this pull request Feb 10, 2021
Summary:
* extract some functionality from places365 fakedata for common use

* add a common DatasetTestcase

* add fakedata generation and tests for STL10

* lint

Reviewed By: fmassa

Differential Revision: D26341418

fbshipit-source-id: 05f8a60c986c32f64339197ea377efc6c4d5b238

Co-authored-by: Francisco Massa <[email protected]>
@pmeier pmeier deleted the stl10-tests branch February 11, 2021 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants