Update chat_templates.py
This commit is contained in:
parent
0fbbdfc091
commit
c247bfc72c
1 changed files with 5 additions and 1 deletions
|
|
@ -1841,7 +1841,11 @@ def train_on_responses_only(
|
|||
pass
|
||||
return { "labels" : all_labels }
|
||||
pass
|
||||
trainer.train_dataset = trainer.train_dataset.map(_train_on_responses_only, batched = True)
|
||||
|
||||
if hasattr(trainer, "train_dataset"):
|
||||
trainer.train_dataset = trainer.train_dataset.map(_train_on_responses_only, batched = True)
|
||||
if hasattr(trainer, "eval_dataset"):
|
||||
trainer.eval_dataset = trainer.eval_dataset .map(_train_on_responses_only, batched = True)
|
||||
return trainer
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue