Sampling with replacement and Persistent Dataset #2075
Replies: 4 comments
-
Hi @lukasfolle , Thanks for your interest here. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Hi @lukasfolle , I used the notebook Nic mentioned to take a quick test. I changed the train data loader into:
I did not meet errors, and the environment I used is the latest MONAI docker, the versions are:
As for the error you met, can you post the code (or use a simple example code that can reproduce the error) and the error log here? |
Beta Was this translation helpful? Give feedback.
-
Hi @lukasfolle , I think this PR can fix your issue: #2086. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Thanks, that linked issue seems to mention the exact same problem I had 👍 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I just noticed that the cache of the
PersistentDataset
gets corrupt when using pytorch weighted random sampler (https://pytorch.org/docs/stable/data.html#torch.utils.data.WeightedRandomSampler) and multiple workers.I have the feeling that the drawing of samples with replacement creates this issue. When using
num_workers=0
the error does not occur anymore, but of cource training is slowed down dramatically.Can anyone confirm this? I might as well create an issue then,
Beta Was this translation helpful? Give feedback.
All reactions