refactor(ppo): remove performance metrics config compatibility after BaseModel migration
- Dominant language
- Python
- Stars
- 2k
- Forks
- 561
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 145
Description
## Context
PR #2518 migrates the GRPO config from TypedDict to Pydantic BaseModel. `print_performance_metrics` is shared by GRPO and PPO, so it temporarily supports both attribute-style GRPO config and dict-style PPO config.
Once PPO config is migrated to BaseModel, remove this compatibility path and use direct typed attribute access throughout.
## Cleanup scope
- Replace the GRPO/PPO `getattr` algorithm detection in `print_performance_metrics` with typed config access.
- Remove the `isinstance(algo_config, dict)` branch for prompt and generation counts.
- Remove the remaining temporary top-level GRPO guard around async metrics if the shared API is split or typed accordingly.
- Update the corresponding unit tests.
Tracked from the review discussion on #2518: https://github.com/NVIDIA-NeMo/RL/pull/2518#discussion_r3692119732
Contributor guide
Assessment
This issue has not been assessed yet.