Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't touch nor send messages to the root logger. #1380

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion transformer_engine/jax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from transformer_engine.common import get_te_path, is_package_installed
from transformer_engine.common import _get_sys_extension

_logger = logging.getLogger(__name__)


def _load_library():
"""Load shared library with Transformer Engine C extensions"""
Expand All @@ -36,7 +38,7 @@ def _load_library():

if is_package_installed("transformer-engine-cu12"):
if not is_package_installed(module_name):
logging.info(
_logger.info(
"Could not find package %s. Install transformer-engine using 'pip"
" install transformer-engine[jax]==VERSION'",
module_name,
Expand Down
4 changes: 3 additions & 1 deletion transformer_engine/paddle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

from transformer_engine.common import is_package_installed

_logger = logging.getLogger(__name__)


def _load_library():
"""Load shared library with Transformer Engine C extensions"""
Expand All @@ -35,7 +37,7 @@ def _load_library():

if is_package_installed("transformer-engine-cu12"):
if not is_package_installed(module_name):
logging.info(
_logger.info(
"Could not find package %s. Install transformer-engine using 'pip"
" install transformer-engine[paddle]==VERSION'",
module_name,
Expand Down
4 changes: 3 additions & 1 deletion transformer_engine/pytorch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from transformer_engine.common import get_te_path, is_package_installed
from transformer_engine.common import _get_sys_extension

_logger = logging.getLogger(__name__)


def _load_library():
"""Load shared library with Transformer Engine C extensions"""
Expand All @@ -40,7 +42,7 @@ def _load_library():

if is_package_installed("transformer-engine-cu12"):
if not is_package_installed(module_name):
logging.info(
_logger.info(
"Could not find package %s. Install transformer-engine using 'pip"
" install transformer-engine[pytorch]==VERSION'",
module_name,
Expand Down
2 changes: 1 addition & 1 deletion transformer_engine/pytorch/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
_formatter = logging.Formatter("[%(levelname)-8s | %(name)-19s]: %(message)s")
_stream_handler = logging.StreamHandler()
_stream_handler.setFormatter(_formatter)
fa_logger = logging.getLogger()
fa_logger = logging.getLogger(__name__)
fa_logger.setLevel(_log_level)
if not fa_logger.hasHandlers():
fa_logger.addHandler(_stream_handler)
Expand Down