Skip to content

Commit

Permalink
Fix PPOTrainer argument train_dataset -> dataset (#1321)
Browse files Browse the repository at this point in the history
Both the argument's name as well as the value need to be renamed.
Otherwise we get both

NameError: name 'train_dataset' is not defined

and

TypeError: PPOTrainer.__init__() got an unexpected keyword argument 'train_dataset'
  • Loading branch information
j-cb authored Feb 6, 2024
1 parent f12a1da commit 6852097
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/ppo_trainer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ from trl import PPOTrainer
ppo_trainer = PPOTrainer(
model=model,
config=config,
train_dataset=train_dataset,
dataset=dataset,
tokenizer=tokenizer,
)
```
Expand Down

0 comments on commit 6852097

Please sign in to comment.