neural_compressor.common.utils.utility
Module Contents
Classes
Lazy import python module till use. |
|
CPU info collection. |
Functions
|
Singleton decorator. |
|
Get the elapsed time for decorated functions. |
|
Set the random seed in config. |
|
Set the workspace in config. |
|
Set the resume_from in config. |
|
Set the tensorboard in config. |
|
- class neural_compressor.common.utils.utility.LazyImport(module_name)[source]
Lazy import python module till use.
- neural_compressor.common.utils.utility.dump_elapsed_time(customized_msg='')[source]
Get the elapsed time for decorated functions.
- Parameters:
customized_msg (string, optional) – The parameter passed to decorator. Defaults to None.
- neural_compressor.common.utils.utility.set_random_seed(seed: int)[source]
Set the random seed in config.
- neural_compressor.common.utils.utility.set_workspace(workspace: str)[source]
Set the workspace in config.