You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle list of metric dicts in reduce_metrics after DataProto.concat()
When multiple workers return metrics, DataProto.concat() aggregates them into a
list of dicts (introduced in b3c6274). This caused reduce_metrics() to fail with
AttributeError: 'list' object has no attribute 'items'.
Changes:
- Update reduce_metrics() to accept both dict and list of dicts
- Merge list of metric dicts before applying reduction operations
- Maintain backward compatibility with existing dict input
- Add comprehensive tests for new list input handling
Fixes the error:
File "verl/trainer/ppo/ray_trainer.py", line 1129, in fit
critic_output_metrics = reduce_metrics(critic_output.meta_info["metrics"])
AttributeError: 'list' object has no attribute 'items'
0 commit comments