Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9327
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit cb8b7bb with merge base 269805e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
NicolasHug
approved these changes
Jan 6, 2026
Member
NicolasHug
left a comment
There was a problem hiding this comment.
Great, thanks for the fix @zy1git !
|
Hey @NicolasHug! You merged this PR, but no labels were added. |
NicolasHug
pushed a commit
to NicolasHug/vision
that referenced
this pull request
Jan 6, 2026
NicolasHug
added a commit
that referenced
this pull request
Jan 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
Fixed the test failures in #9317:
2026-01-05T15:58:40.1734062Z FAILED test/test_datasets.py::SintelTestCase::test_feature_types - TypeError: only 0-dimensional arrays can be converted to Python scalars
2026-01-05T15:58:40.1735400Z FAILED test/test_datasets.py::SintelTestCase::test_flow - TypeError: only 0-dimensional arrays can be converted to Python scalars
2026-01-05T15:58:40.1736711Z FAILED test/test_datasets.py::SintelTestCase::test_num_examples - TypeError: only 0-dimensional arrays can be converted to Python scalars
2026-01-05T15:58:40.1738053Z FAILED test/test_datasets.py::SintelTestCase::test_transforms - TypeError: only 0-dimensional arrays can be converted to Python scalars
2026-01-05T15:58:40.1739427Z FAILED test/test_datasets.py::SintelTestCase::test_tv_decode_image_support - TypeError: only 0-dimensional arrays can be converted to Python scalars
2026-01-05T15:58:40.1740948Z FAILED test/test_datasets.py::FlyingChairsTestCase::test_feature_types - TypeError: only 0-dimensional arrays can be converted to Python scalars
2026-01-05T15:58:40.1742330Z FAILED test/test_datasets.py::FlyingChairsTestCase::test_flow - TypeError: only 0-dimensional arrays can be converted to Python scalars
2026-01-05T15:58:40.1743690Z FAILED test/test_datasets.py::FlyingChairsTestCase::test_num_examples - TypeError: only 0-dimensional arrays can be converted to Python scalars
2026-01-05T15:58:40.1745092Z FAILED test/test_datasets.py::FlyingChairsTestCase::test_transforms - TypeError: only 0-dimensional arrays can be converted to Python scalars
In the latest NumPy,
int()no longer accepts 1-dimensional arrays.np.fromfile(f, "<i4", count=1)returns a 1-dimensional array with one element (shape (1,)), not a 0-dimensional scalar. In old Numpy, calling int() on a 1-element array worked implicitly, but in newer versions, this raisesTypeError: only 0-dimensional arrays can be converted to Python scalars. Thus, using.item()to extract the scalar value from the array can fix the test failures.