You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warnings.formatwarning=lambdamsg, *args, **kwargs: str(msg) +'\n'# ignore everything except the message
This pattern of overwriting the builtin implementation is actually recommended in the docs of the builtin warnings module. However, this kind of import-time side-effect seems inappropriate for a package, as it will interfere with other packages' use of warnings.
A similar case caused issues in the pypdf2 package: py-pdf/pypdf#67
The text was updated successfully, but these errors were encountered:
This decision of updating warnings package was very poor and it really hurt our development procedure. Our production code relies on many packages along and use heavily on warnings and all of the sudden, we got this issue and nobody could figure that out for about a year until we finally decide to delve into the issue. Our codebase is large and we cannot identify which makes this issue until today :(. I logged in to report this issue but it has already been reported. This issue should be more of a bug than an enhancement in my view.
The global warnings formatter is overwritten here:
shap/shap/explainers/_tree.py
Line 23 in e51a87d
This pattern of overwriting the builtin implementation is actually recommended in the docs of the builtin
warnings
module. However, this kind of import-time side-effect seems inappropriate for a package, as it will interfere with other packages' use of warnings.A similar case caused issues in the pypdf2 package: py-pdf/pypdf#67
The text was updated successfully, but these errors were encountered: