Issue with ToTensor Transform and Multiprocessing in PyTorch Lightning #20343
Unanswered
DaniMlk
asked this question in
DDP / multi-GPU / multi-node
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I’m encountering an issue with the ToTensor transform when using multiprocessing within PyTorch Lightning. I’ve implemented a custom dataset that reads data, applies transformations, and places the processed data into a queue using multiprocessing. Then, in the getitem method, I fetch the data from the queue.
The process works flawlessly outside of the PyTorch Lightning environment, but when I integrate it into PyTorch Lightning and attempt to apply the ToTensor transform, the data suddenly disappears with the error message 'no more image', which also disappears shortly after. Interestingly, when I move the transform application directly to the getitem function, it works fine.I also dug into the transform and noticed the issue is when it tries to change the data type.
Beta Was this translation helpful? Give feedback.
All reactions