print deps module version

pull/879/head
Hui Zhang 3 years ago
parent c8e96d732b
commit f4f2d6f07e

@ -27,6 +27,7 @@ from deepspeech.utils import mp_tools
from deepspeech.utils import profiler
from deepspeech.utils.checkpoint import Checkpoint
from deepspeech.utils.log import Log
from deepspeech.utils.utility import all_version
from deepspeech.utils.utility import seed_all
from deepspeech.utils.utility import UpdateConfig
@ -103,6 +104,7 @@ class Trainer():
self.epoch = 0
self.rank = dist.get_rank()
all_version()
logger.info(f"Rank: {self.rank}/{dist.get_world_size()}")
if args.seed:

@ -16,17 +16,36 @@ import distutils.util
import math
import os
import random
import sys
from contextlib import contextmanager
from typing import List
import numpy as np
import paddle
import soundfile
from deepspeech.utils.log import Log
logger = Log(__name__).getlog()
__all__ = [
"UpdateConfig", "seed_all", 'print_arguments', 'add_arguments', "log_add"
"all_version", "UpdateConfig", "seed_all", 'print_arguments',
'add_arguments', "log_add"
]
def all_version():
vers = {
"python": sys.version,
"paddle": paddle.__version__,
"paddle_commit": paddle.version.commit,
"soundfile": soundfile.__version__,
}
logger.info("Deps Module Version:")
for k, v in vers.items():
logger.info(f"{k}: {v}")
@contextmanager
def UpdateConfig(config):
"""Update yacs config"""

Loading…
Cancel
Save