diff options
author | vkalintiris <vasilis@netdata.cloud> | 2023-01-04 14:51:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-04 14:51:25 +0200 |
commit | 78359cd375d0b2c285741e6f934a681d0a0c3c15 (patch) | |
tree | 2d5264325510b663d9e87ca62a38fad187e3a713 /ml/Config.cc | |
parent | df379e45fbaddf825f1f7972a75ae3f3daf80097 (diff) |
Refactor ML code and add support for multiple KMeans models (#14198)
* Add profile.plugin
Creates the specified number of charts/dimensions, and supports
backfilling with pseudo-historical data.
* Bump
* Remove wrongly merged line.
* Use the number of models specified from the config section.
* Add option to consult all ML models.
* Remove profiling option consuming all models.
* Add underscore after chart name prefix.
* prediction -> dimensions chart
* reorder funcs
* Split charts across types with correct priority
* Ignore training request when chart is under replication.
* Track global number of models consulted.
* Cleanup config.
* initial readme updates
* fix readme
* readme
* Fix function definition when ML is disabled.
* Add dummy ml_chart_update_{begin,end}
* Remove profile_plugin
* Define chart priorities under collectors/all.h
* s/curr_t/current_time/
* Use libnetdata's lock/thread wrappers.
* Fix autotools & cmake builds.
* Delete ML dimensions & charts.
* Let users of buffer preprocessing to handle memory.
* Add separate API calls to start/stop ML threads.
Co-authored-by: Andrew Maguire <andrewm4894@gmail.com>
Diffstat (limited to 'ml/Config.cc')
-rw-r--r-- | ml/Config.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ml/Config.cc b/ml/Config.cc index eedd8c29fd..ba3a614452 100644 --- a/ml/Config.cc +++ b/ml/Config.cc @@ -31,7 +31,7 @@ void Config::readMLConfig(void) { unsigned MaxTrainSamples = config_get_number(ConfigSectionML, "maximum num samples to train", 4 * 3600); unsigned MinTrainSamples = config_get_number(ConfigSectionML, "minimum num samples to train", 1 * 900); unsigned TrainEvery = config_get_number(ConfigSectionML, "train every", 1 * 3600); - unsigned NumModelsToUse = config_get_number(ConfigSectionML, "number of models per dimension", 1 * 24); + unsigned NumModelsToUse = config_get_number(ConfigSectionML, "number of models per dimension", 1); unsigned DiffN = config_get_number(ConfigSectionML, "num samples to diff", 1); unsigned SmoothN = config_get_number(ConfigSectionML, "num samples to smooth", 3); @@ -53,7 +53,7 @@ void Config::readMLConfig(void) { MaxTrainSamples = clamp<unsigned>(MaxTrainSamples, 1 * 3600, 24 * 3600); MinTrainSamples = clamp<unsigned>(MinTrainSamples, 1 * 900, 6 * 3600); TrainEvery = clamp<unsigned>(TrainEvery, 1 * 3600, 6 * 3600); - NumModelsToUse = clamp<unsigned>(TrainEvery, 1, 7 * 24); + NumModelsToUse = clamp<unsigned>(NumModelsToUse, 1, 7 * 24); DiffN = clamp(DiffN, 0u, 1u); SmoothN = clamp(SmoothN, 0u, 5u); @@ -108,7 +108,7 @@ void Config::readMLConfig(void) { // Always exclude anomaly_detection charts from training. Cfg.ChartsToSkip = "anomaly_detection.* "; Cfg.ChartsToSkip += config_get(ConfigSectionML, "charts to skip from training", "netdata.*"); - Cfg.SP_ChartsToSkip = simple_pattern_create(ChartsToSkip.c_str(), NULL, SIMPLE_PATTERN_EXACT); + Cfg.SP_ChartsToSkip = simple_pattern_create(Cfg.ChartsToSkip.c_str(), NULL, SIMPLE_PATTERN_EXACT); Cfg.StreamADCharts = config_get_boolean(ConfigSectionML, "stream anomaly detection charts", true); } |