master
h 28 lines 945 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_ML_PRIVATE_H
4 #define NETDATA_ML_PRIVATE_H
5
6 #include <vector>
7 #include <unordered_map>
8
9 #include "ml_config.h"
10
11 void ml_train_main(void *arg);
12 void ml_detect_main(void *arg);
13
14 bool ml_dimension_train_model_precheck(enum ml_metric_type mt,
15 bool has_received_downstream_model,
16 bool training_in_progress,
17 enum ml_worker_result *worker_res);
18 bool ml_should_requeue_create_new_model(enum ml_worker_result worker_res);
19 bool ml_should_publish_model_update(bool host_running,
20 uint32_t current_generation,
21 uint32_t expected_generation,
22 bool *training_in_progress);
23
24 extern sqlite3 *ml_db;
25 extern const char *db_models_create_table;
26
27
28 #endif /* NETDATA_ML_PRIVATE_H */