refactor : metric_logger 改用事件类型 (type=step/validation/epoch)

- 每种事件独立 schema,不再混入 null 字段
- 回调顺序 validation 移到 metric_logger 之前,确保 on_optimizer_step 先跑
- 用内部 _last_val_loss 代替 TrainContext.last_val_iter 判断新验证
- 修复 factory.py 未使用导入、evaluate_ifeval.py 多余 f 前缀
This commit is contained in:
2026-06-25 17:18:20 +08:00
parent 88ec63121d
commit b4587c5d08
4 changed files with 30 additions and 22 deletions
+1 -1
View File
@@ -571,7 +571,7 @@ def main():
print(f" Unsupported: {summary['unsupported_constraints']}")
print(f"{'=' * 60}")
print(f"\nPer-type accuracy:")
print("\nPer-type accuracy:")
for inst_id, stats in sorted(summary["per_type_accuracy"].items()):
print(
f" {inst_id:50s} {stats['accuracy']:.2%} "