diff --git a/src/lighteval/__main__.py b/src/lighteval/__main__.py index 4484f7812..e4053813e 100644 --- a/src/lighteval/__main__.py +++ b/src/lighteval/__main__.py @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. import logging -from logging.config import dictConfig +import logging.config import colorlog import typer @@ -57,7 +57,8 @@ }, ) -dictConfig(logging_config) +logging.config.dictConfig(logging_config) +logging.captureWarnings(capture=True) app.command(rich_help_panel="Evaluation Backends")(lighteval.main_accelerate.accelerate) app.command(rich_help_panel="Evaluation Utils")(lighteval.main_baseline.baseline) diff --git a/src/lighteval/models/transformers/transformers_model.py b/src/lighteval/models/transformers/transformers_model.py index 19ead82cc..295ed4b11 100644 --- a/src/lighteval/models/transformers/transformers_model.py +++ b/src/lighteval/models/transformers/transformers_model.py @@ -22,6 +22,7 @@ import logging import os +import warnings from dataclasses import dataclass from typing import Optional, Tuple, Union