Skip to content

Commit

Permalink
Pass cfg.SEED to dataloader building
Browse files Browse the repository at this point in the history
Summary: As title, so that dataloading is deterministic when `cfg.SEED` is set.

Differential Revision: D53547772
  • Loading branch information
jiaxuzhu92 authored and facebook-github-bot committed Feb 7, 2024
1 parent d6b2d86 commit 96be394
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion d2go/data/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,15 @@ def build_weighted_detection_train_loader(
)
)

sampler = RepeatFactorTrainingSampler(repeat_factors)
sampler = RepeatFactorTrainingSampler(repeat_factors, seed=cfg.SEED)

return build_batch_data_loader(
dataset,
sampler,
cfg.SOLVER.IMS_PER_BATCH,
aspect_ratio_grouping=cfg.DATALOADER.ASPECT_RATIO_GROUPING,
num_workers=cfg.DATALOADER.NUM_WORKERS,
seed=cfg.SEED,
)


Expand Down

0 comments on commit 96be394

Please sign in to comment.