summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Maguire <andrewm4894@gmail.com>2020-12-11 09:54:40 +0000
committerGitHub <noreply@github.com>2020-12-11 09:54:40 +0000
commitbebb8040c6eb95fce1e6c12b568f68ba7ed85926 (patch)
tree17004d2174aab2c86e083f3f0ef804d085aab1fd
parent1cdf2851623e568d56c38604fe1d8b216380cb77 (diff)
add two more insignificant warnings to suppress in anomalies collectorandrewm4894-patch-4
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.
-rw-r--r--collectors/python.d.plugin/anomalies/anomalies.chart.py2
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