Skip to content

Commit

Permalink
Update accelerate_ppo_trainer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Jingru authored Nov 15, 2023
1 parent d283ee2 commit fd3d95b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trlx/trainer/accelerate_ppo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@ def make_experience(self, num_rollouts: int = 1024, iter_count: int = 0): # noq
scores_mask = scores != -np.inf

if self.config.train.reward_only_in_main_process:
str_samples, str_prompts, str_outputs = self.decode(prompt_tensors, samples, append_eos_token=True)
_, _, str_outputs = self.decode(prompt_tensors, samples, append_eos_token=True)
else:
str_samples, str_prompts, str_outputs = all_str_samples, all_str_prompts, all_str_outputs
str_outputs = all_str_outputs

# Pad the sample outputs
outputs = self.tokenizer(str_outputs).input_ids
Expand Down

0 comments on commit fd3d95b

Please # to comment.