Skip to content

Commit

Permalink
MultiProcDataset, random_seed_offset from parent
Browse files Browse the repository at this point in the history
The default random seed offset logic
might not work properly in the subproc,
e.g. accessing the distributed environ.
  • Loading branch information
albertz committed Nov 26, 2023
1 parent 9c72180 commit 561a421
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions returnn/datasets/multi_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def __init__(
for k, v in kwargs.items():
if k not in dataset:
dataset[k] = v
if "random_seed_offset" not in dataset:
dataset["random_seed_offset"] = self.random_seed_offset
self.dataset = dataset
self.num_workers = num_workers
self.buffer_size = buffer_size
Expand Down

0 comments on commit 561a421

Please sign in to comment.