-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Conversation
root, data = places365 | ||
|
||
dataset = torchvision.datasets.Places365(root, download=True) | ||
self.assertIsInstance(repr(dataset), str) | ||
|
||
|
||
class STL10Tester(DatasetTestcase): |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
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]>
No description provided.