Skip to content

Commit

Permalink
💩✨Supported loader_seed_sync
Browse files Browse the repository at this point in the history
  • Loading branch information
carefree0910 committed Oct 23, 2024
1 parent 98e8a51 commit dd8e173
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/learn/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@ def _iter(self: DataLoader) -> Iterator[tensor_dict_type]:
if not iter_prepared:
td.__iter__ = _iter_factory(td.__iter__)
td._iter_prepared_ = True
if not loader.data.config.loader_seed_sync:
prepared.rng_types = None
return prepared_loaders


Expand All @@ -522,6 +524,7 @@ class DataConfig(ISerializableDataClass["DataConfig"]):
loader_configs: Optional[Dict[str, Any]] = None
valid_loader_configs: Optional[Dict[str, Any]] = None
loader_seed: Optional[int] = None
loader_seed_sync: bool = True
bypass_collate_fn: bool = True
# async prefetch configs
async_prefetch: bool = False
Expand Down

0 comments on commit dd8e173

Please sign in to comment.