Skip to content

Commit

Permalink
Merge branch 'trl0.16' of github.com:hjh0119/swift into trl0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
hjh committed Feb 21, 2025
2 parents 6d7cbc2 + 605a47a commit 9e23cbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion swift/trainers/rlhf_trainer/grpo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,6 @@ def _get_per_token_logps(self, model, inputs):
def evaluation_loop(self, *args, **kwargs):
metric_key_prefix = kwargs['metric_key_prefix']
output = super().evaluation_loop(*args, **kwargs)
metrics = {f'{metric_key_prefix}_{key}': sum(val) / len(val) for key, val in self._metrics.items()}
metrics = {f'{metric_key_prefix}_{key}': sum(val) / len(val) for key, val in self._metrics['eval'].items()}
output.metrics.update(metrics)
return output

0 comments on commit 9e23cbd

Please sign in to comment.