mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 18:26:11 +00:00
style: apply ruff-format to lerobot_train.py
Collapse the compute_sampler_state(...) call onto one line so the ruff-format pre-commit hook passes (fixes the failing CI check). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -410,9 +410,7 @@ def train(cfg: TrainPipelineConfig, accelerator: "Accelerator | None" = None):
|
|||||||
f"written with num_processes={saved_num_processes}. The data order resumes at the "
|
f"written with num_processes={saved_num_processes}. The data order resumes at the "
|
||||||
"right epoch/offset, but per-rank sample-exactness requires the same world size."
|
"right epoch/offset, but per-rank sample-exactness requires the same world size."
|
||||||
)
|
)
|
||||||
sampler_state = compute_sampler_state(
|
sampler_state = compute_sampler_state(step, len(sampler), cfg.batch_size, ckpt_num_processes)
|
||||||
step, len(sampler), cfg.batch_size, ckpt_num_processes
|
|
||||||
)
|
|
||||||
sampler.load_state_dict(sampler_state)
|
sampler.load_state_dict(sampler_state)
|
||||||
if is_main_process:
|
if is_main_process:
|
||||||
logging.info(
|
logging.info(
|
||||||
|
|||||||
Reference in New Issue
Block a user