Skip to content

3962 Update CacheDataset num workers#3963

Merged
wyli merged 4 commits intoProject-MONAI:devfrom
yiheng-wang-nv:3962-update-cache-dataset-num-worker
Mar 17, 2022
Merged

3962 Update CacheDataset num workers#3963
wyli merged 4 commits intoProject-MONAI:devfrom
yiheng-wang-nv:3962-update-cache-dataset-num-worker

Conversation

@yiheng-wang-nv
Copy link
Copy Markdown
Contributor

@yiheng-wang-nv yiheng-wang-nv commented Mar 17, 2022

Signed-off-by: Yiheng Wang [email protected]

Fixes #3962 .

Description

In this PR, the default value of num_workers is set to 1 for CacheDataset and all its subclasses. Some of the subclasses use the value 0, although it will be replaced by 1 automatically, zero thread is meaningless and it is actually an illegal input for multiprocessing.pool.ThreadPool (used within the CacheDataset, the source code of it is in here) thus I also modified them.
In addition, this PR also fixes a few typos and unify the docstrings for same arguments in different classes.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@yiheng-wang-nv yiheng-wang-nv requested a review from wyli March 17, 2022 10:32
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Mar 17, 2022

/build

1 similar comment
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Mar 17, 2022

/build

@wyli wyli enabled auto-merge (squash) March 17, 2022 17:01
@wyli wyli merged commit 7ee3488 into Project-MONAI:dev Mar 17, 2022
@yiheng-wang-nv yiheng-wang-nv deleted the 3962-update-cache-dataset-num-worker branch March 18, 2022 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CacheDataset gets stuck when initializing cache content

3 participants