Open qmpzzpmq opened 1 year ago
I'm also using dictionaries and see a memory leak. I'm highlighting a different issue but I'm seeing a small increase in usage over time as well:
@andrew-bydlon I got a temp method to fix the issue. I split my original dict as two dict, one only contains the tensor another without tensor.
Same problem with python dict and tensordict.
same!
🐛 Describe the bug
Passing dict in datapipe or dataset will casuse memory leak
output:
Versions
torch version: 2.0.0 torchdata version: 0.6.0
It is clear that is pasing the dict of tensor memory will leak but list of tensor will not.
I used dict of tensor in my model training, and I found the training faied multiple times all since of memory leak. And I tried to used Tensordict(https://pytorch.org/rl/tensordict/), but it cannot contains the string. I need string during my datapipes passing (str to tensor encode in one of datapipes).