Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove: shuffle=False option #6886

Merged
merged 4 commits into from
Aug 18, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions monai/data/samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class DistributedWeightedRandomSampler(DistributedSampler):
by default, `world_size` is retrieved from the current distributed group.
rank: rank of the current process within `num_replicas`. by default,
`rank` is retrieved from the current distributed group.
shuffle: if `True`, sampler will shuffle the indices, default to True.
kwargs: additional arguments for `DistributedSampler` super class, can be `seed` and `drop_last`.

"""
Expand All @@ -95,15 +94,14 @@ def __init__(
even_divisible: bool = True,
num_replicas: int | None = None,
rank: int | None = None,
shuffle: bool = True,
**kwargs,
):
kwargs.setdefault("shuffle", True)
wyli marked this conversation as resolved.
Show resolved Hide resolved
super().__init__(
dataset=dataset,
even_divisible=even_divisible,
num_replicas=num_replicas,
rank=rank,
shuffle=shuffle,
**kwargs,
)
self.weights = weights
Expand Down
Loading