Update tokenizer_utils.py
This commit is contained in:
parent
87034b1891
commit
16ddec731a
1 changed files with 5 additions and 2 deletions
|
|
@ -1059,8 +1059,11 @@ for trainer_name in ("SFTTrainer", "DPOTrainer", "KTOTrainer"):
|
|||
if trainer_text is None: continue
|
||||
try:
|
||||
exec(trainer_text, globals())
|
||||
except:
|
||||
raise RuntimeError(f"Unsloth: Please file a bug report! Error patching {trainer_name}")
|
||||
except Exception as error:
|
||||
raise RuntimeError(
|
||||
f"Unsloth: Please file a bug report! Error patching {trainer_name}. Error:\n"\
|
||||
f"{str(error)}",
|
||||
)
|
||||
exec(f"trl.trainer.{trainer_name} = Unsloth{trainer_name}", globals())
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue