From 8ec30e5275c80a62ebeab9a95bdd5712a23a2f53 Mon Sep 17 00:00:00 2001 From: Younes Belkada <49240599+younesbelkada@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:42:23 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: lewtun --- trl/trainer/sft_trainer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trl/trainer/sft_trainer.py b/trl/trainer/sft_trainer.py index d344cc1fcf..0af8763b8b 100644 --- a/trl/trainer/sft_trainer.py +++ b/trl/trainer/sft_trainer.py @@ -145,7 +145,7 @@ def __init__( if infinite is not None: warnings.warn( - "The `infinite` argument is deprecated. Use `TrainingArgument.max_steps` or `TrainingArgument.num_epochs` instead to control training length." + "The `infinite` argument is deprecated and will be removed in a future version of TRL. Use `TrainingArguments.max_steps` or `TrainingArguments.num_train_epochs` instead to control training length." ) if isinstance(model, str): @@ -382,7 +382,7 @@ def _prepare_packed_dataloader( if dataset_text_field is not None or formatting_func is not None: if tokenizer is None: raise ValueError( - "You need to pass a tokenizer when using the SFT Trainer when passing a `dataset_text_field`." + "You need to pass a tokenizer when using `dataset_text_field` with `SFTTrainer`." ) constant_length_iterator = ConstantLengthDataset(