sagemaker.core.config.config_utils#
This file contains util functions for the sagemaker Defaults Config.
These utils may be used inside or outside the config module.
Functions
Return a logger with the name 'sagemaker.config' |
|
|
Create log function that filters the repeated messages. |
- sagemaker.core.config.config_utils.get_sagemaker_config_logger()[source]#
Return a logger with the name ‘sagemaker.config’
If the logger to be returned has no level or handlers set, this will get level and handler attributes. (So if the SDK user has setup loggers in a certain way, that setup will not be changed by this function.) It is safe to make repeat calls to this function.
- sagemaker.core.config.config_utils.non_repeating_log_factory(logger: Logger, method: str, cache_size=100) Callable[source]#
Create log function that filters the repeated messages.
By default. It only keeps track of last 100 messages, if a repeated message arrives after the
cache_sizemessages, it will be displayed.- Parameters:
logger (logging.Logger) – the logger to be used to dispatch the message.
method (str) – the log method, can be info, warning or debug.
cache_size (int) – the number of last log messages to keep in cache. Default to 100
- Returns:
the new log method
- Return type:
(Callable)