You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could we add __del__ to clean up buffer, which are attached to DataPipe instance.
Demux
Fork
etc
Motivation, pitch
We may encounter the problem that the objects inside buffer are not clean up by DataPipe instance itself but relied on gc to clean up.
This could potentially to resolve the problem from pytorch/vision#5801 (comment)
TorchVision chose to ignore the ResourceWarning for the test suite. But, we still need to consider for other domains or users who want to keep these warnings.
I can submit a PR for this. I gave this some thoughts, I think calling clear() should clear the buffer without deleting the underlying objects so that if there are other references to those objects, they will still work properly.
🚀 The feature
Could we add
__del__
to clean upbuffer
, which are attached toDataPipe
instance.Motivation, pitch
We may encounter the problem that the objects inside
buffer
are not clean up byDataPipe
instance itself but relied ongc
to clean up.This could potentially to resolve the problem from pytorch/vision#5801 (comment)
TorchVision chose to ignore the
ResourceWarning
for the test suite. But, we still need to consider for other domains or users who want to keep these warnings.Alternatives
No response
Additional context
No response
cc: @NivekT
The text was updated successfully, but these errors were encountered: