Logger module in Efficient Transformers - #517
quic-hemagnih wants to merge 3 commits into
Conversation
Signed-off-by: Hem Agnihotri <hemagnih@qti.qualcomm.com>
Signed-off-by: Hem Agnihotri <hemagnih@qti.qualcomm.com>
| from QEfficient.utils.logging_utils import logger | ||
| from QEfficient.utils.logging_utils import QEFFLogger | ||
|
|
||
| logger = QEFFLogger.get_logger() |
There was a problem hiding this comment.
nit: where will this logs be dumped? in the default QEFF_HOME path?
There was a problem hiding this comment.
Currently I am placing the logs at "~/.cache/.log, but we can think of a better place to keep all the logs. Only consideration we need to keep is we need to store init time logs also, so at init time many directories or sub-directories won't be available.
| logger = QEFFLogger.get_logger() | ||
|
|
||
| # Register the cleanup function | ||
| atexit.register(QEFFLogger.close_logger) |
There was a problem hiding this comment.
Can we make the naming as QEffLogger, consistent with other library naming styles.
|
|
||
| def _initialize_logger(self) -> logging.Logger: | ||
| # Define the hidden log directory path | ||
| log_dir = os.path.expanduser("~/.cache/.log") |
There was a problem hiding this comment.
should be QEFF_HOME set by the user instead of default.
Default would be ~/.cache/qeff_models, but can be overridden by the user.
There was a problem hiding this comment.
Need to see whether during init time directory qeff_models is created or not?
|
This change is not ready for review. Developement is still going on. Will post comment once its ready for review. |
|
This PR is moved to #555 |
This PR adds a logger module to the Efficient Transformer, enabling users to log messages at various levels such as INFO, DEBUG, WARNING, and ERROR.
It also provides the flexibility to configure the logging level based on the user's specific execution needs.