Created
June 16, 2022 15:41
-
-
Save Guitaricet/013ac1461097112c1a48ee3ebc1d8b94 to your computer and use it in GitHub Desktop.
Good default logger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import logging | |
logging.basicConfig( | |
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s", | |
datefmt="%Y-%m-%d %H:%M:%S", | |
level=logging.INFO, | |
stream=sys.stdout, | |
) | |
logger = logging.getLogger(os.path.basename(__file__)) | |
logging.getLogger("transformers.configuration_utils").setLevel(logging.WARNING) | |
logging.getLogger("wandb.sdk.internal.internal").setLevel(logging.WARNING) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment