mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-25 02:36:11 +00:00
Address review: shorten config comment, note spawn startup tradeoff
Per @jashshah999, mention that spawn workers re-import modules and so add some startup time vs fork. Also trim the failure-mode dump from the inline comment — the linked issue covers the symptoms in detail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -101,13 +101,10 @@ class TrainPipelineConfig(HubMixin):
|
|||||||
batch_size: int = 8
|
batch_size: int = 8
|
||||||
prefetch_factor: int = 4
|
prefetch_factor: int = 4
|
||||||
persistent_workers: bool = True
|
persistent_workers: bool = True
|
||||||
# DataLoader multiprocessing start method. "spawn" is the safe default on
|
# DataLoader worker start method. "spawn" is safer than "fork" with
|
||||||
# Linux because workers do not inherit fork-time state from the parent —
|
# non-fork-safe libs (PyAV / torchcodec / ffmpeg — see #2488), but
|
||||||
# "fork" can crash with non-fork-safe libraries that the parent has loaded
|
# adds some worker-startup time per run since workers re-import
|
||||||
# (e.g. PyAV / torchcodec / ffmpeg) with errors like
|
# modules instead of inheriting parent state.
|
||||||
# `multiprocessing.context.AuthenticationError: digest received was wrong`,
|
|
||||||
# `Pin memory thread exited unexpectedly`, or random worker segfaults.
|
|
||||||
# See https://github.com/huggingface/lerobot/issues/2488.
|
|
||||||
dataloader_multiprocessing_context: str = "spawn"
|
dataloader_multiprocessing_context: str = "spawn"
|
||||||
steps: int = 100_000
|
steps: int = 100_000
|
||||||
# Run policy in the simulation environment every N steps to measure reward/success (0 = disabled).
|
# Run policy in the simulation environment every N steps to measure reward/success (0 = disabled).
|
||||||
|
|||||||
Reference in New Issue
Block a user