diff options
author | Andrew Maguire <andrewm4894@gmail.com> | 2020-12-11 10:48:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-11 10:48:07 +0000 |
commit | d0a194b897668f0ed4c9c91a179e24cc81448cf3 (patch) | |
tree | 81d420e63f2b55a62cec2599f44325d7f3f0dd4e /collectors | |
parent | 110d3378273a0a3c26c2b695684c037b927d2a85 (diff) |
add two more insignificant warnings to suppress in anomalies collector (#10369)
Following some discussion here: https://community.netdata.cloud/t/collector-anomalies-error-on-loading-source/581/11
The underlying python libraries, mainly numpy and sklearn can sometimes generate warnings for numerous, typically transient reasons relating to some quirk of the underlying data. For the purpose of the anomalies collector they don't really matter as worst case you would end up with the predict step failing and your predictions just becoming a constant values of last successful prediction and charts would just become flat lines making it obvious something is wrong.
So warnings like this are expected to pop up every now and then from individual charts/models.
For the most common and harmless ones we explicitly suppress them in the collector code itself so as to avoid risk of excessive logging of them to logs.
This change just add's two more warning message filters.
Diffstat (limited to 'collectors')
-rw-r--r-- | collectors/python.d.plugin/anomalies/anomalies.chart.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/collectors/python.d.plugin/anomalies/anomalies.chart.py b/collectors/python.d.plugin/anomalies/anomalies.chart.py index 426900bfd5..cacc9ce433 100644 --- a/collectors/python.d.plugin/anomalies/anomalies.chart.py +++ b/collectors/python.d.plugin/anomalies/anomalies.chart.py @@ -26,6 +26,8 @@ from bases.FrameworkServices.SimpleService import SimpleService # ignore some sklearn/numpy warnings that are ok warnings.filterwarnings('ignore', r'All-NaN slice encountered') warnings.filterwarnings('ignore', r'invalid value encountered in true_divide') +warnings.filterwarnings('ignore', r'divide by zero encountered in true_divide') +warnings.filterwarnings('ignore', r'invalid value encountered in subtract') disabled_by_default = True |