mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 02:06:15 +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
|
scheduler: LRSchedulerConfig | None = None
|
||||||
eval: EvalConfig = field(default_factory=EvalConfig)
|
eval: EvalConfig = field(default_factory=EvalConfig)
|
||||||
wandb: WandBConfig = field(default_factory=WandBConfig)
|
wandb: WandBConfig = field(default_factory=WandBConfig)
|
||||||
use_peft: bool = False
|
peft: PeftConfig | None = None
|
||||||
peft: PeftConfig = field(default_factory=PeftConfig)
|
|
||||||
|
|
||||||
def __post_init__(self):
|
def __post_init__(self):
|
||||||
self.checkpoint_path = None
|
self.checkpoint_path = None
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ def train(cfg: TrainPipelineConfig):
|
|||||||
ds_meta=dataset.meta,
|
ds_meta=dataset.meta,
|
||||||
)
|
)
|
||||||
|
|
||||||
if cfg.use_peft:
|
if cfg.peft is not None:
|
||||||
logging.info("Using PEFT! Wrapping model.")
|
logging.info("Using PEFT! Wrapping model.")
|
||||||
policy = wrap_policy_in_peft_model(cfg, policy)
|
policy = wrap_policy_in_peft_model(cfg, policy)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user