mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
log step
This commit is contained in:
parent
f5958e96da
commit
f690741b9a
@ -465,7 +465,8 @@ class Trainer:
|
|||||||
batch_num_epoch = len(dataloader_train)
|
batch_num_epoch = len(dataloader_train)
|
||||||
self.log(
|
self.log(
|
||||||
epoch,
|
epoch,
|
||||||
batch_idx + kwargs.get("start_step", 0),
|
batch_idx,
|
||||||
|
log_step=batch_idx + kwargs.get("start_step", 0),
|
||||||
step_in_epoch=self.step_in_epoch,
|
step_in_epoch=self.step_in_epoch,
|
||||||
batch_num_epoch=batch_num_epoch,
|
batch_num_epoch=batch_num_epoch,
|
||||||
lr=lr,
|
lr=lr,
|
||||||
@ -634,11 +635,12 @@ class Trainer:
|
|||||||
tag="train",
|
tag="train",
|
||||||
data_split_i=0,
|
data_split_i=0,
|
||||||
data_split_num=1,
|
data_split_num=1,
|
||||||
|
log_step=None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
|
|
||||||
if (batch_idx + 1) % self.log_interval == 0:
|
if (batch_idx + 1) % self.log_interval == 0:
|
||||||
|
batch_idx = log_step if log_step is not None else batch_idx
|
||||||
gpu_info = (
|
gpu_info = (
|
||||||
"GPU, memory: usage: {:.3f} GB, "
|
"GPU, memory: usage: {:.3f} GB, "
|
||||||
"peak: {:.3f} GB, "
|
"peak: {:.3f} GB, "
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user