Skip to content

Commit 704a5bb

Browse files
authored
[utils] update precision of speed metric (#2524)
when `accum_grad` is large, say 16, `steps/sec` might be less than 0.1
1 parent f2372ae commit 704a5bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wenet/utils/train_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ def log_per_step(writer, info_dict, timer: Optional[StepTimer] = None):
788788
if info_dict.get("cv_step", None) is not None:
789789
timer_step = info_dict['cv_step']
790790
steps_per_second = timer.steps_per_second(timer_step)
791-
log_str += 'steps/sec {:.1f}| '.format(steps_per_second)
791+
log_str += 'steps/sec {:.3f}| '.format(steps_per_second)
792792
log_str += 'Batch {}/{} loss {:.6f} '.format(
793793
epoch, batch_idx + 1 if 'save_interval' not in info_dict else
794794
(step + 1) * accum_grad,

0 commit comments

Comments
 (0)