mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 10:16:09 +00:00
fix OOM bug
This commit is contained in:
@@ -216,7 +216,10 @@ def train(cfg: TrainPipelineConfig, accelerator: Callable | None = None):
|
|||||||
cfg=cfg.policy,
|
cfg=cfg.policy,
|
||||||
ds_meta=dataset.meta,
|
ds_meta=dataset.meta,
|
||||||
)
|
)
|
||||||
policy.to(device)
|
|
||||||
|
# Only move to device if not using accelerator (accelerator.prepare will handle device placement)
|
||||||
|
if not accelerator:
|
||||||
|
policy.to(device)
|
||||||
|
|
||||||
# Wait for all processes to finish policy creation before continuing
|
# Wait for all processes to finish policy creation before continuing
|
||||||
if accelerator:
|
if accelerator:
|
||||||
|
|||||||
Reference in New Issue
Block a user