Skip to content

Commit 66e9be5

Browse files
leezuszha
authored andcommitted
Don't override global warnings filter (apache#12245)
Currently import mxnet causes warnings.filterwarnings('default', category=DeprecationWarning) to be executed. This is very bad, as there are valid use cases where our users may have decided to filter out DeprecationWarning and we should not overwrite their configuration.
1 parent 73c6427 commit 66e9be5

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

python/mxnet/base.py

-3
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,12 @@
2424
import ctypes
2525
import os
2626
import sys
27-
import warnings
2827
import inspect
2928
import platform
3029
import numpy as np
3130

3231
from . import libinfo
3332

34-
warnings.filterwarnings('default', category=DeprecationWarning)
35-
3633
__all__ = ['MXNetError']
3734
#----------------------------
3835
# library loading

0 commit comments

Comments
 (0)