Skip to content

Commit 42dcf4a

Browse files
committed
remove unnecessary changes
1 parent b6b4529 commit 42dcf4a

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

deepmd/pt/utils/dataloader.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,6 @@ def get_weighted_sampler(training_data, prob_style, sys_prob=False):
272272
probs,
273273
len_sampler,
274274
replacement=True,
275-
generator=torch.Generator(),
276-
# If we are not setting the generator here, the random state will be initialized in the beginning of each new epoch.
277-
# This operation involves creating a new tensor for seeding on the default device,
278-
# while unit tests requires specifying the device explicitly.
279-
# https://github.com/pytorch/pytorch/blob/134179474539648ba7dee1317959529fbd0e7f89/torch/utils/data/sampler.py#L170
280275
)
281276
return sampler
282277

0 commit comments

Comments
 (0)