mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Fix wandb
integration with SetFit
model (#30021)
Fix W&B integration with SetFit model Co-authored-by: PEARCE Timothe <timothe_pearce@ext.connect-tech.sncf>
This commit is contained in:
parent
f4d189441d
commit
3b5fa14fb8
@ -753,7 +753,7 @@ class WandbCallback(TrainerCallback):
|
||||
combined_dict = {**args.to_dict()}
|
||||
|
||||
if hasattr(model, "config") and model.config is not None:
|
||||
model_config = model.config.to_dict()
|
||||
model_config = model.config if isinstance(model.config, dict) else model.config.to_dict()
|
||||
combined_dict = {**model_config, **combined_dict}
|
||||
if hasattr(model, "peft_config") and model.peft_config is not None:
|
||||
peft_config = model.peft_config
|
||||
|
Loading…
Reference in New Issue
Block a user