mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-06 09:37:06 +00:00
Remove use_peft parameter from training script
Instead we make the PEFT config optional which has the same effect.
This commit is contained in:
@@ -63,8 +63,7 @@ class TrainPipelineConfig(HubMixin):
|
||||
scheduler: LRSchedulerConfig | None = None
|
||||
eval: EvalConfig = field(default_factory=EvalConfig)
|
||||
wandb: WandBConfig = field(default_factory=WandBConfig)
|
||||
use_peft: bool = False
|
||||
peft: PeftConfig = field(default_factory=PeftConfig)
|
||||
peft: PeftConfig | None = None
|
||||
|
||||
def __post_init__(self):
|
||||
self.checkpoint_path = None
|
||||
|
||||
@@ -247,7 +247,7 @@ def train(cfg: TrainPipelineConfig):
|
||||
ds_meta=dataset.meta,
|
||||
)
|
||||
|
||||
if cfg.use_peft:
|
||||
if cfg.peft is not None:
|
||||
logging.info("Using PEFT! Wrapping model.")
|
||||
policy = wrap_policy_in_peft_model(cfg, policy)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user