Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪆 Fix for Incorrect ValueError Handling in reward_weights in grpo_tra…
…iner.py (#2843) - Fixed a bug where an extra `len` call inside the error message caused a `TypeError` instead of the expected `ValueError`. - Replaced `len(len(args.reward_weights))` with the correct `len(args.reward_weights)` to properly calculate the number of reward weights. - Ensured that a `ValueError` is now raised with an accurate and clear message when the number of reward weights does not match the number of reward functions. This fix prevents confusion during debugging and ensures proper error handling during validation. Tested with cases where: - `args.reward_weights` is None (default case). - `args.reward_weights` has mismatched lengths with `reward_funcs`.
- Loading branch information