mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-25 05:29:55 +00:00
fix(pi052): build processors from current config
When fine-tuning from pi05_base, reuse only the pretrained weights so pi052 still generates recipe text labels and FAST action labels. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -455,6 +455,13 @@ def train(cfg: TrainPipelineConfig, accelerator: "Accelerator | None" = None):
|
|||||||
accelerator.wait_for_everyone()
|
accelerator.wait_for_everyone()
|
||||||
|
|
||||||
processor_pretrained_path = cfg.policy.pretrained_path
|
processor_pretrained_path = cfg.policy.pretrained_path
|
||||||
|
if cfg.policy.type == "pi052" and processor_pretrained_path is not None and not cfg.resume:
|
||||||
|
logging.warning(
|
||||||
|
"pi052 is loading pretrained weights from %s, but building processors from the current "
|
||||||
|
"pi052 config so recipe text labels and FAST action labels are generated.",
|
||||||
|
processor_pretrained_path,
|
||||||
|
)
|
||||||
|
processor_pretrained_path = None
|
||||||
if (
|
if (
|
||||||
getattr(cfg.policy, "use_relative_actions", False)
|
getattr(cfg.policy, "use_relative_actions", False)
|
||||||
and processor_pretrained_path is not None
|
and processor_pretrained_path is not None
|
||||||
|
|||||||
Reference in New Issue
Block a user