"benchmark/git@developer.sourcefind.cn:zhaoyu6/sglang.git" did not exist on "150d7020ed8fcba4f3fdef52b770850aff8ae048"
Unverified Commit 7edc33ac authored by Zach Mueller's avatar Zach Mueller Committed by GitHub
Browse files

Fix eval_accumulation_steps leading to incorrect metrics (#24756)

Fix eval steps
parent 45025d92
......@@ -3154,7 +3154,7 @@ class Trainer:
self.control = self.callback_handler.on_prediction_step(args, self.state, self.control)
# Gather all tensors and put them back on the CPU if we have done enough accumulation steps.
if args.eval_accumulation_steps is not None and (step + 1) % args.eval_accumulation_steps == 0:
if args.eval_accumulation_steps is not None and self.accelerator.sync_gradients:
if losses_host is not None:
losses = nested_numpify(losses_host)
all_losses = losses if all_losses is None else np.concatenate((all_losses, losses), axis=0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment