Skip to content

Commit 6cb82eb

Browse files
committed
Added warning for extension failure.
1 parent 71c8d4f commit 6cb82eb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

python/interpret-core/interpret/ext/extension_utils.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import logging
55
import pkg_resources
66
import re
7+
from warnings import warn
8+
79

810
module_logger = logging.getLogger(__name__)
911

@@ -60,8 +62,9 @@ def load_class_extensions(current_module, extension_key, extension_class_validat
6062
setattr(current_module, extension_class_name, extension_class)
6163

6264
except Exception as e: # pragma: no cover
63-
module_logger.warning(
64-
"Failure while loading {}. Failed to load entrypoint {} with exception {}.".format(
65-
extension_key, entrypoint, e
66-
)
65+
msg = "Failure while loading {}. Failed to load entrypoint {} with exception {}.".format(
66+
extension_key, entrypoint, e
6767
)
68+
module_logger.warning(msg)
69+
70+
warn(msg)

0 commit comments

Comments
 (0)