mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-17 23:11:45 +00:00
Formatting
This commit is contained in:
+1
-1
@@ -155,7 +155,7 @@ class RecordConfig:
|
|||||||
self.policy = PreTrainedConfig.from_pretrained(policy_path, cli_overrides=cli_overrides)
|
self.policy = PreTrainedConfig.from_pretrained(policy_path, cli_overrides=cli_overrides)
|
||||||
self.policy.pretrained_path = policy_path
|
self.policy.pretrained_path = policy_path
|
||||||
|
|
||||||
if (Path(policy_path) / 'adapter_config.json').exists():
|
if (Path(policy_path) / "adapter_config.json").exists():
|
||||||
self.policy.use_peft = True
|
self.policy.use_peft = True
|
||||||
|
|
||||||
if self.teleop is None and self.policy is None:
|
if self.teleop is None and self.policy is None:
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ def get_default_peft_configuration(policy_type):
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
return {'modules_to_save': None}
|
return {"modules_to_save": None}
|
||||||
|
|
||||||
|
|
||||||
def wrap_policy_in_peft_model(cfg, policy):
|
def wrap_policy_in_peft_model(cfg, policy):
|
||||||
@@ -149,7 +149,7 @@ def wrap_policy_in_peft_model(cfg, policy):
|
|||||||
if peft_config_cli[key] is not None:
|
if peft_config_cli[key] is not None:
|
||||||
peft_config_policy[key] = peft_config_cli[key]
|
peft_config_policy[key] = peft_config_cli[key]
|
||||||
|
|
||||||
if 'target_modules' not in peft_config_policy:
|
if "target_modules" not in peft_config_policy:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"There is no default `target_modules` value for policy {cfg.policy.type}. Please pass it manually."
|
f"There is no default `target_modules` value for policy {cfg.policy.type}. Please pass it manually."
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user