Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: lewtun <[email protected]>
  • Loading branch information
younesbelkada and lewtun authored Dec 4, 2023
1 parent e7618ec commit 8ec30e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trl/trainer/sft_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 8ec30e5

Please sign in to comment.