log#
- class Logger(name: str | None = None)[源代码]#
基类:
objectDefault logger in PaddleNLP
- 参数:
name (str) -- Logger name, default is 'PaddleNLP'
- processing(msg: str, interval: float = 0.1)[源代码]#
Continuously print a progress bar with rotating special effects.
- 参数:
msg (str) -- Message to be printed.
interval (float) -- Rotation interval. Default to 0.1.
- warning_once(*args, **kwargs)[源代码]#
This method is identical to
logger.warning(), but will emit the warning with the same message only onceNote: The cache is for the function arguments, so 2 different callers using the same arguments will hit the cache. The assumption here is that all warning messages are unique across the code. If they aren't then need to switch to another type of cache that includes the caller frame information in the hashing function.