fix cachedataset w persistent workers problem by deep copying#2121
fix cachedataset w persistent workers problem by deep copying#2121rijobro merged 14 commits intoProject-MONAI:devfrom
Conversation
Signed-off-by: Richard Brown <[email protected]>
Nic-Ma
left a comment
There was a problem hiding this comment.
Looks good to me.
Could you please help run the CacheDataset tutorial twice with / without deepcopy to make sure it will not affect the training speed and memory usage?
https://github.com/Project-MONAI/tutorials/blob/master/acceleration/dataset_type_performance.ipynb
Thanks.
Signed-off-by: Richard Brown <[email protected]>
…workers Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
|
Hi @rijobro , Do you have update on this PR? Thanks. |
|
Sorry, put the comment in a resolved conversation. All looks good to me, I'll just have a look at the github action error. |
Signed-off-by: Richard Brown <[email protected]>
|
looks like an issue with the latest pytype google/pytype#909 |
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
|
BTW, I tested this PR in our
Thanks. |
…t-MONAI#2121) fix cachedataset w persistent workers problem by deep copying first non-deterministic transform Signed-off-by: Yaniel Cabrera <[email protected]>
…t-MONAI#2121) fix cachedataset w persistent workers problem by deep copying first non-deterministic transform Signed-off-by: Yaniel Cabrera <[email protected]>
…t-MONAI#2121) fix cachedataset w persistent workers problem by deep copying first non-deterministic transform Signed-off-by: Yaniel Cabrera <[email protected]>
fix cachedataset w persistent workers problem by deep copying first non-deterministic transform
fix cachedataset w persistent workers problem by deep copying first non-deterministic transform
fix cachedataset w persistent workers problem by deep copying first non-deterministic transform
fix cachedataset w persistent workers problem by deep copying first non-deterministic transform
fix cachedataset w persistent workers problem by deep copying first non-deterministic transform
fix cachedataset w persistent workers problem by deep copying first non-deterministic transform
fix cachedataset w persistent workers problem by deep copying first non-deterministic transform
fix cachedataset w persistent workers problem by deep copying first non-deterministic transform
Fixes #2116.
Description
When using
CacheDatasetcombined withpersistent_workers=Truein theDataLoader, it seems that the<key>_transformsare duplicated for the first random transform onwards.So for a transform of
Compose([Spacingd, RandAffined, ToTensord]), then on the second pass through the data, we would haveimg_transformsas:Spacing, RandAffined, ToTensord, RandAffined, ToTensord. This implies a shallow copy at some point.I've put the copy in the
CacheDatasetbut I worry that this may cause unnecessary copying of the data. Having said that, I can't see where else to put it... I'm open to ideas.Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests.make htmlcommand in thedocs/folder.