File size: 552 Bytes
5fa1a76
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
For example:

TRANSFORMERS_NO_ADVISORY_WARNINGS=1 ./myprogram.py
Here is an example of how to use the same logger as the library in your own module or script:
thon
from transformers.utils import logging
logging.set_verbosity_info()
logger = logging.get_logger("transformers")
logger.info("INFO")
logger.warning("WARN")

All the methods of this logging module are documented below, the main ones are
[logging.get_verbosity] to get the current level of verbosity in the logger and
[logging.set_verbosity] to set the verbosity to the level of your choice.