| 66 | |
| 67 | @dataclass |
| 68 | class DataInfo: |
| 69 | dataloader: DataLoader |
| 70 | sampler: DistributedSampler = None |
| 71 | shared_epoch: SharedEpoch = None |
| 72 | |
| 73 | def set_epoch(self, epoch): |
| 74 | if self.shared_epoch is not None: |
| 75 | self.shared_epoch.set_value(epoch) |
| 76 | if self.sampler is not None and isinstance(self.sampler, DistributedSampler): |
| 77 | self.sampler.set_epoch(epoch) |
| 78 | |
| 79 | |
| 80 | def expand_urls(urls, weights=None): |
no outgoing calls
no test coverage detected