Skip to content

Commit

Permalink
Don't touch nor send messages to the root logger.
Browse files Browse the repository at this point in the history
---------

Signed-off-by: Sérgio Agostinho <[email protected]>
  • Loading branch information
sagostinho-nvidia committed Dec 19, 2024
1 parent a3b32ec commit f804609
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
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

0 comments on commit f804609

Please sign in to comment.