Centralize logging (#6434)

* Logging

* Style

* hf_logging > utils.logging

* Address @thomwolf's comments

* Update test

* Update src/transformers/benchmark/benchmark_utils.py

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Revert bad change

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
Lysandre Debut
2020-08-26 11:10:36 -04:00
committed by GitHub
parent 461ae86812
commit 77abd1e79f
144 changed files with 497 additions and 347 deletions

View File

@@ -20,7 +20,6 @@
import copy
import json
import logging
import os
import warnings
from collections import OrderedDict, UserDict
@@ -41,6 +40,7 @@ from .file_utils import (
is_torch_available,
torch_required,
)
from .utils import logging
if is_tf_available():
@@ -49,7 +49,7 @@ if is_torch_available():
import torch
logger = logging.getLogger(__name__)
logger = logging.get_logger(__name__)
VERY_LARGE_INTEGER = int(1e30) # This is used to set the max input length for a model with infinite size input
LARGE_INTEGER = int(1e20) # This is used when we need something big but slightly smaller than VERY_LARGE_INTEGER