fix: keep metric logs cumulative instead of segmental in each checkpoint

This commit is contained in:
2026-07-28 09:18:48 +08:00
parent d9a0c72149
commit 9f7cf50c56
-1
View File
@@ -310,7 +310,6 @@ class MetricCallback(TrainCallback):
with open(log_file, "w") as f:
for log in self.log_cache:
f.write(json.dumps(log) + "\n")
self.log_cache.clear()
def on_optimizer_step(self, context):
if (