get_logger¶
- torchtune.utils.get_logger(level: Optional[str] = None) Logger [source]¶
Get a logger with a stream handler.
- Parameters:
level (Optional[str]) – The logging level. See https://docs.python.org/3/library/logging.html#levels for list of levels.
Example
>>> logger = get_logger("INFO") >>> logger.info("Hello world!") INFO:torchtune.utils._logging:Hello world!
- Returns:
The logger.
- Return type: