Skip to content

Commit

Permalink
fix (#1678)
Browse files Browse the repository at this point in the history
  • Loading branch information
younesbelkada authored May 29, 2024
1 parent 3c0a10b commit 488b502
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions trl/trainer/sft_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ def __init__(
dataset_kwargs: Optional[Dict] = None,
eval_packing: Optional[bool] = None,
):
if args is None:
output_dir = "tmp_trainer"
warnings.warn(f"No `SFTConfig` passed, using `output_dir={output_dir}`.")
args = SFTConfig(output_dir=output_dir)

if model_init_kwargs is not None:
warnings.warn(
"You passed `model_init_kwargs` to the SFTTrainer, the value you passed will override the one in the `SFTConfig`."
Expand Down

0 comments on commit 488b502

Please sign in to comment.