Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Jan 28, 2025
1 parent 72d1a4c commit e8377c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ markers = [
"bitsandbytes: select (or deselect with `not`) bitsandbytes integration tests",
"generate: marks tests that use the GenerationTesterMixin"
]
log_cli = 1
log_cli_level = "WARNING"
3 changes: 2 additions & 1 deletion src/transformers/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def _configure_library_root_logger() -> None:
formatter = logging.Formatter("[%(levelname)s|%(pathname)s:%(lineno)s] %(asctime)s >> %(message)s")
_default_handler.setFormatter(formatter)

library_root_logger.propagate = False
is_ci = os.getenv("CI") is not None and os.getenv("CI").upper() in {"1", "ON", "YES", "TRUE"}
library_root_logger.propagate = True if is_ci else False


def _reset_library_root_logger() -> None:
Expand Down

0 comments on commit e8377c1

Please sign in to comment.