Skip to content

Commit

Permalink
🚑️Patched prepare_dataloaders
Browse files Browse the repository at this point in the history
  • Loading branch information
carefree0910 committed Oct 17, 2024
1 parent ada6474 commit 627f98c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/learn/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ def _iter(self: DataLoader) -> Iterator[tensor_dict_type]:
base = d.base_dataloader
base.async_prefetch = loader.async_prefetch
base.async_prefetch_factor = loader.async_prefetch_factor
base._get_iterator = loader._get_iterator
if base.async_prefetch:
base._get_iterator = loader._get_iterator
td = type(d)
iter_prepared = getattr(td, "_iter_prepared_", False)
if not iter_prepared:
Expand Down

0 comments on commit 627f98c

Please sign in to comment.