fix: correct online rollout lifecycle

This commit is contained in:
2026-07-23 19:01:37 +08:00
parent 99b5d2b2da
commit 8ab5631446
7 changed files with 173 additions and 20 deletions
+1
View File
@@ -83,6 +83,7 @@ class Trainer:
if executor.sync_gradients:
self._call_callbacks("on_optimizer_step", context)
context.optimizer.step()
context.strategy.on_optimizer_step()
context.optimizer.zero_grad()
if context.scheduler: