Skip to content

1742 Add DistributedWeightedRandomSampler#1745

Merged
wyli merged 18 commits into
Project-MONAI:masterfrom
Nic-Ma:1742-add-distributed-weighted-random-sampler
Mar 12, 2021
Merged

1742 Add DistributedWeightedRandomSampler#1745
wyli merged 18 commits into
Project-MONAI:masterfrom
Nic-Ma:1742-add-distributed-weighted-random-sampler

Conversation

@Nic-Ma

@Nic-Ma Nic-Ma commented Mar 11, 2021

Copy link
Copy Markdown
Contributor

Fixes #1742 .

Description

This PR added the DistributedWeightedRandomSampler to enhance MONAI samplers.

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.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma

Nic-Ma commented Mar 11, 2021

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma Nic-Ma requested review from ericspod, rijobro and wyli March 11, 2021 10:37
Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
Comment thread monai/data/utils.py Outdated
Comment thread monai/data/utils.py Outdated
Comment thread monai/data/utils.py Outdated
Nic-Ma added 2 commits March 11, 2021 19:05
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma

Nic-Ma commented Mar 11, 2021

Copy link
Copy Markdown
Contributor Author

Hi @ericspod ,

Thanks for your review.
I updated the PR according to your comments.
Could you please help take a look again?

Thanks.

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma force-pushed the 1742-add-distributed-weighted-random-sampler branch from 8b5cd42 to 74883b1 Compare March 11, 2021 11:49
Comment thread monai/data/samplers.py Outdated

@ericspod ericspod left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth the effort to clean up the arguments in the constructor still but otherwise it looks good.

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma requested a review from ericspod March 11, 2021 14:34
@Nic-Ma

Nic-Ma commented Mar 11, 2021

Copy link
Copy Markdown
Contributor Author

/black

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma

Nic-Ma commented Mar 11, 2021

Copy link
Copy Markdown
Contributor Author

/black

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma force-pushed the 1742-add-distributed-weighted-random-sampler branch from e24d397 to 2537956 Compare March 11, 2021 15:05
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma

Nic-Ma commented Mar 11, 2021

Copy link
Copy Markdown
Contributor Author

/black

1 similar comment
@Nic-Ma

Nic-Ma commented Mar 11, 2021

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma

Nic-Ma commented Mar 11, 2021

Copy link
Copy Markdown
Contributor Author

Hi @ericspod ,

Thanks for your review.
I have clean the args, could you please help review it again?

Thanks.

wyli
wyli previously approved these changes Mar 11, 2021
@wyli wyli enabled auto-merge (squash) March 11, 2021 22:43
@wyli wyli disabled auto-merge March 12, 2021 00:14
@wyli wyli dismissed their stale review March 12, 2021 00:14

some ci errors

@Nic-Ma

Nic-Ma commented Mar 12, 2021

Copy link
Copy Markdown
Contributor Author

Hi @wyli and @ericspod ,

The CI tests conflicted with the master branch so CUDA out of memory. Passed now.

Thanks.

@wyli wyli enabled auto-merge (squash) March 12, 2021 14:14
@wyli

wyli commented Mar 12, 2021

Copy link
Copy Markdown
Contributor

I rerun the tests a few times, works fine now, could you help review it again? @ericspod

@wyli wyli merged commit 21a3c16 into Project-MONAI:master Mar 12, 2021
@Nic-Ma Nic-Ma deleted the 1742-add-distributed-weighted-random-sampler branch July 2, 2021 23:39
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.

Need DistributedWeightedRandomSampler

4 participants