refactor : metric 日志改为以 optimizer step 为单位,默认每步记录
- log_interval 默认 100 -> 1,语义从 batch iteration 改为 optimizer step - step 指标从 on_batch_end 移到 on_optimizer_step,不受梯度累积影响 - JSONL 条目新增 step 字段,保留 iter - flush 落盘仍在 on_batch_end
This commit is contained in:
@@ -68,8 +68,8 @@ class TrainConfig(BaseConfig):
|
||||
default="./checkpoint/logs", metadata={"help": "Directory for metric logs."}
|
||||
)
|
||||
log_interval: int = field(
|
||||
default=100,
|
||||
metadata={"help": "Number of batch iterations between metric logs."},
|
||||
default=1,
|
||||
metadata={"help": "Number of optimizer steps between metric logs."},
|
||||
)
|
||||
metrics: List[str] = field(
|
||||
default_factory=lambda: ["loss", "lr", "grad_norm"],
|
||||
|
||||
Reference in New Issue
Block a user