File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/nupic/research/monitor_mixin Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 23
23
Plot class used in monitor mixin framework.
24
24
"""
25
25
26
- import logging
27
26
import os
28
27
29
28
try :
30
29
# We import in here to avoid creating a matplotlib dependency in nupic.
31
30
import matplotlib .pyplot as plt
32
31
import matplotlib .cm as cm
33
32
except ImportError :
34
- # Suppress; we log it at debug level to avoid polluting the logs of apps
35
- # and services that don't care about plotting
36
- logging .debug ("Cannot import matplotlib. Plot class will not work." ,
37
- exc_info = True )
33
+ # Suppress this optional dependency on matplotlib. NOTE we don't log this,
34
+ # because python logging implicitly adds the StreamHandler to root logger when
35
+ # calling `logging.debug`, etc., which may undermine an application's logging
36
+ # configuration.
37
+ plt = None
38
+ cm = None
38
39
39
40
40
41
You can’t perform that action at this time.
0 commit comments