remove videos from test for DatasetFolder #7216
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The test mixed images and videos and this made it an outlier for two reasons:
It inherited from the image test case, but this meant it missed out on
vision/test/datasets_utils.py
Line 642 in c974742
coming from the video test case. This was not an issue until Add Python 3.11 Linux CPU Unittesting #7155 (comment).
Since the test needed to handle images and videos at the same time, we didn't bother to write an actual loader, but just returned the path back:
vision/test/test_datasets.py
Lines 1550 to 1551 in c974742
Again, not an issue until Compatibility layer between stable datasets and prototype transforms #6663 (comment).
Both issues individually could be fixed, by adding the missing config parameter or by special casing it for the newly added tests. However, I don't think we gain much here by checking video and images.
Thus, this PR removes the video stuff from the test case and just focuses on the images. Note that in contrast to the test case for
ImageFolder
, we still test multiple extensions and make sure that we didn't pick up anything unrelated.