deepmd.loggers package

Alias of deepmd_utils.loggers for backward compatibility.

deepmd.loggers.set_log_handles(level: int, log_path: Optional[Path] = None, mpi_log: Optional[str] = None)[source]

Set desired level for package loggers and add file handlers.

Parameters
levelint

logging level

log_pathOptional[str]

path to log file, if None logs will be send only to console. If the parent directory does not exist it will be automatically created, by default None

mpi_logOptional[str], optional

mpi log type. Has three options. master will output logs to file and console only from rank==0. collect will write messages from all ranks to one file opened under rank==0 and to console. workers will open one log file for each worker designated by its rank, console behaviour is the same as for collect. If this argument is specified, package ‘mpi4py’ must be already installed. by default None

Raises
RuntimeError

If the argument mpi_log is specified, package mpi4py is not installed.

Notes

Logging levels:

our notation

python logging

tensorflow cpp

OpenMP

debug

10

10

0

1/on/true/yes

info

20

20

1

0/off/false/no

warning

30

30

2

0/off/false/no

error

40

40

3

0/off/false/no

References

https://groups.google.com/g/mpi4py/c/SaNzc8bdj6U https://stackoverflow.com/questions/35869137/avoid-tensorflow-print-on-standard-error https://stackoverflow.com/questions/56085015/suppress-openmp-debug-messages-when-running-tensorflow-on-cpu

Submodules

deepmd.loggers.loggers module

Alias of deepmd_utils.loggers.loggers for backward compatibility.

deepmd.loggers.loggers.set_log_handles(level: int, log_path: Optional[Path] = None, mpi_log: Optional[str] = None)[source]

Set desired level for package loggers and add file handlers.

Parameters
levelint

logging level

log_pathOptional[str]

path to log file, if None logs will be send only to console. If the parent directory does not exist it will be automatically created, by default None

mpi_logOptional[str], optional

mpi log type. Has three options. master will output logs to file and console only from rank==0. collect will write messages from all ranks to one file opened under rank==0 and to console. workers will open one log file for each worker designated by its rank, console behaviour is the same as for collect. If this argument is specified, package ‘mpi4py’ must be already installed. by default None

Raises
RuntimeError

If the argument mpi_log is specified, package mpi4py is not installed.

Notes

Logging levels:

our notation

python logging

tensorflow cpp

OpenMP

debug

10

10

0

1/on/true/yes

info

20

20

1

0/off/false/no

warning

30

30

2

0/off/false/no

error

40

40

3

0/off/false/no

References

https://groups.google.com/g/mpi4py/c/SaNzc8bdj6U https://stackoverflow.com/questions/35869137/avoid-tensorflow-print-on-standard-error https://stackoverflow.com/questions/56085015/suppress-openmp-debug-messages-when-running-tensorflow-on-cpu