[eval][1/3] Introduce EvalDispatcher (towards async evals) - #2198
Conversation
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request introduces an evaluation dispatcher abstraction (BaseEvalDispatcher, BlockingEvalDispatcher) to decouple training loops from direct evaluation calls, and refactors the W&B tracking adapter to support out-of-order step logging using a custom step axis. Review feedback suggests ensuring accurate timing of baseline evaluations by calling drain() inside the timed blocks in both FullyAsyncTrainer and RayPPOTrainer. Additionally, it is recommended to improve robustness in _WandbAdapter by guarding against self.run being None and using run-specific logging methods, with corresponding updates to the test assertions.
|
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
This is the first out of a series of PRs for async evals. We create a new
EvalDispatcherclass that orchestrates evals and provides a framework for various evaluation execution strategies.The dispatcher design is simple. For every step of the training loop:
submitevaluations for the current step.get_completeddrainall pending evals and log them.Misc changes:
on_logno longer contains eval metrics as most async eval strategies don't support it.Note
Medium Risk
Touches core training/eval loops and experiment logging semantics (eval callback timing, per-step tracker writes, wandb step axis); behavior should match blocking eval today but logging and callbacks differ slightly from direct
eval()+commitbatching.Overview
Introduces an eval dispatcher layer (
BaseEvalDispatcher/BlockingEvalDispatcher) so training loops submit, poll completed, and drain evals instead of callingeval()inline. The dispatcher ownson_eval_start/on_eval_end; the loop logs via_log_eval_resultsat each result’sglobal_step(needed for future async eval).RayPPOTrainerandFullyAsyncRayPPOTrainerare wired through this path, withdrain+closeon exit.W&B tracking gets a
_WandbAdapterthat logs a customglobal_stepaxis so metrics can be written out of order (e.g. late eval rows).Tracking.log(commit=...)is deprecated (one committed row per call).eval()gains optionalgenerator/eval_dataloader/global_stepoverrides for dispatchers. Tests and GPU e2e checks updated for the new step field.Reviewed by Cursor Bugbot for commit 36f4bd9. Bugbot is set up for automated code reviews on this repo. Configure here.