Commit 795a99f
set_distributed_sampler_epoch for multidataset samplers (#1040)
Summary:
Pull Request resolved: #1040
- TorchTNT automatically sets the `sampler` epoch to ensure sampling is not the same across batches.
- However, the epoch was *not* being set for `batch_sampler`s, which are used in the `MultiDataset` case. See [a related (since resolved) issue for Pytorch Lightning](Lightning-AI/pytorch-lightning#13316).
- Here I'm running `set_epoch` for the `batch_sampler` when applicable.
Reviewed By: galrotem
Differential Revision: D87585393
fbshipit-source-id: e629253b45418710cf8c0bba118af24e37e2633e1 parent 0b1d2c3 commit 795a99f
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments