pytorch / data

A PyTorch repo for data loading and utilities to be shared by the PyTorch domain libraries.
BSD 3-Clause "New" or "Revised" License
1.08k stars 142 forks source link

Handle case where state is a tensor #1272

Closed gokulavasan closed 3 weeks ago

gokulavasan commented 3 weeks ago

Fixes the case where tensor is returned as the state instead of a dict. This was failing because the tensor object was being used as a bool check for the walrus operator and that failed. Instead just do regular fetch and not None comparison.

Added unit tests in all the layers to cover this

Fixes #{1271}

Changes

-

pytorch-bot[bot] commented 3 weeks ago

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/data/1272

Note: Links to docs will display an error until the docs builds have been completed.

:white_check_mark: No Failures

As of commit 10cd79bc81059fe083c261c7d29148ab143eba70 with merge base a25d58c1198bb225383194fd88864f5dbaaeb6b8 (image): :green_heart: Looks good so far! There are no failures yet. :green_heart:

This comment was automatically generated by Dr. CI and updates every 15 minutes.