Skip to content

Commit f1a82de

Browse files
authored
Update pp_model_utils.py
1 parent 54f70b1 commit f1a82de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddlenlp/rl/models/pp_model_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ def fwd_step_patch(func, output, self, *args, **kwargs):
3838
# Training patch
3939
if self.training and self.is_pipeline_last_stage():
4040
if getattr(self, "_step_losses", None):
41-
self._step_losses.append(output.detach())
41+
self._step_losses.append(output[0].detach())
4242
else:
43-
self._step_losses = [output.detach()]
43+
self._step_losses = [output[0].detach()]
4444

4545

4646
def make_wrapper(func, pre_patch=None, post_patch=None):

0 commit comments

Comments
 (0)