1871 thread-safety for the cache-based datasets#2227
Merged
wyli merged 14 commits intoProject-MONAI:devfrom May 21, 2021
Merged
1871 thread-safety for the cache-based datasets#2227wyli merged 14 commits intoProject-MONAI:devfrom
wyli merged 14 commits intoProject-MONAI:devfrom
Conversation
Contributor
Author
|
/black |
5e50a9a to
702ab37
Compare
ericspod
reviewed
May 21, 2021
ericspod
approved these changes
May 21, 2021
Contributor
|
Thanks for the enhancement for CacheDataset, it's heavily used in NVIDIA Clara project, I will try to review this PR as soon as possible. |
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Nic-Ma
reviewed
May 21, 2021
Contributor
Nic-Ma
left a comment
There was a problem hiding this comment.
Thanks for the enhancement, put several comments inline.
Others look good to me.
Thanks.
Signed-off-by: monai-bot <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
wyli
added a commit
that referenced
this pull request
May 26, 2021
* thread safety impl. Signed-off-by: Wenqi Li <[email protected]> * fixes croppad Signed-off-by: Wenqi Li <[email protected]> * fixed intensity Signed-off-by: Wenqi Li <[email protected]> * fixes spatial Signed-off-by: Wenqi Li <[email protected]> * fixes util Signed-off-by: Wenqi Li <[email protected]> * autofix Signed-off-by: Wenqi Li <[email protected]> * update docstring Signed-off-by: Wenqi Li <[email protected]> * update datastats Signed-off-by: Wenqi Li <[email protected]> * fixes docstring Signed-off-by: Wenqi Li <[email protected]> * fixes torch 1.7 issue Signed-off-by: Wenqi Li <[email protected]> * fixes mac/win n_workers Signed-off-by: Wenqi Li <[email protected]> * update based on comments Signed-off-by: Wenqi Li <[email protected]> * [MONAI] python code formatting Signed-off-by: monai-bot <[email protected]> Co-authored-by: monai-bot <[email protected]>
wyli
added a commit
that referenced
this pull request
May 26, 2021
* thread safety impl. Signed-off-by: Wenqi Li <[email protected]> * fixes croppad Signed-off-by: Wenqi Li <[email protected]> * fixed intensity Signed-off-by: Wenqi Li <[email protected]> * fixes spatial Signed-off-by: Wenqi Li <[email protected]> * fixes util Signed-off-by: Wenqi Li <[email protected]> * autofix Signed-off-by: Wenqi Li <[email protected]> * update docstring Signed-off-by: Wenqi Li <[email protected]> * update datastats Signed-off-by: Wenqi Li <[email protected]> * fixes docstring Signed-off-by: Wenqi Li <[email protected]> * fixes torch 1.7 issue Signed-off-by: Wenqi Li <[email protected]> * fixes mac/win n_workers Signed-off-by: Wenqi Li <[email protected]> * update based on comments Signed-off-by: Wenqi Li <[email protected]> * [MONAI] python code formatting Signed-off-by: monai-bot <[email protected]> Co-authored-by: monai-bot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1871
Description
this PR addresses cache-based dataset multi-thread preloading issues by:
monai.transforms.ThreadUnsafeAPI, the unsafe transforms will be deepcopied in the cache computation.ThreadUnsafeall the randomisables are not thread-safe, but we only use them with multi-process dataloader, there's no multi-thread issue.
Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests.make htmlcommand in thedocs/folder.