Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
qgallouedec committed Feb 5, 2025
1 parent a38231f commit 3a738f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions trl/trainer/grpo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ def _set_signature_columns_if_needed(self):
if self._signature_columns is None:
self._signature_columns = ["prompt"]

# We need a custom sampler that samples the same prompt multiple times
def _get_train_sampler(self) -> Sampler:
return RepeatRandomSampler(self.train_dataset, self.num_generations)

Expand Down

0 comments on commit 3a738f9

Please sign in to comment.