mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-23 20:50:02 +00:00
more video prefetch
This commit is contained in:
@@ -257,8 +257,9 @@ def train(cfg: TrainPipelineConfig):
|
|||||||
sampler=sampler,
|
sampler=sampler,
|
||||||
pin_memory=device.type == "cuda",
|
pin_memory=device.type == "cuda",
|
||||||
drop_last=False,
|
drop_last=False,
|
||||||
persistent_workers=cfg.num_workers > 0, # Keep workers alive
|
persistent_workers=cfg.num_workers > 0, # Keep workers alive between epochs
|
||||||
prefetch_factor=2 if cfg.num_workers > 0 else None, # Prefetch batches
|
prefetch_factor=6, # More aggressive prefetching for video
|
||||||
|
timeout=30, # Prevent hanging on video decode errors
|
||||||
)
|
)
|
||||||
dl_iter = cycle(dataloader)
|
dl_iter = cycle(dataloader)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user