You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Tree/AI-capability/AINode_apache.md
+65-43Lines changed: 65 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,17 +21,24 @@
21
21
22
22
# AINode
23
23
24
-
AINode is an IoTDB native node designed to support the registration, management, and invocation of large-scale timeseries models. It comes with industry-leading proprietary timeseries models such as Timer and Sundial. These models can be invoked through standard SQL statements, enabling real-time inference of time series data at the millisecond level, and supporting application scenarios such as trend forecasting, missing value imputation, and anomaly detection for time series data.
24
+
AINode is a native IoTDB node that supports the registration, management, and invocation of time-series-related models. It comes with built-in industry-leading self-developed time-series large models, such as the Timer series developed by Tsinghua University. These models can be invoked through standard SQL statements, enabling real-time inference of time series data at the millisecond level, and supporting application scenarios such as trend forecasting, missing value imputation, and anomaly detection for time series data.
The responsibilities of the three nodes are as follows:
31
32
32
-
-**ConfigNode**: responsible for storing and managing the meta-information of the model; responsible for distributed node management.
33
-
-**DataNode**: responsible for receiving and parsing SQL requests from users; responsible for storing time-series data; responsible for preprocessing computation of data.
34
-
-**AINode**: responsible for model file import creation and model inference.
33
+
-**ConfigNode:**
34
+
- Manages distributed nodes and handles load balancing across the system.
35
+
-**DataNode:**
36
+
- Receives and parses user SQL queries.
37
+
- Stores time-series data.
38
+
- Performs preprocessing computations on raw data.
39
+
-**AINode:**
40
+
- Manages and utilizes time-series models (including training/inference).
41
+
- Supports deep learning and machine learning workflows.
35
42
36
43
## 1. Advantageous features
37
44
@@ -58,12 +65,12 @@ Compared with building a machine learning service alone, it has the following ad
58
65
-**Built-in capabilities**: AINode comes with machine learning algorithms or home-grown models for common timing analysis scenarios (e.g., prediction and anomaly detection).
59
66
60
67
::: center
61
-
<imgsrc="/img/AInode2.png"style="zoom:50%" />
68
+
<imgsrc="/img/AINode-en.png"style="zoom:50%" />
62
69
::::
63
70
64
71
## 3. Installation and Deployment
65
72
66
-
The deployment of AINode can be found in the document [Deployment Guidelines](../Deployment-and-Maintenance/AINode_Deployment_apache.md#ainode-deployment).
73
+
The deployment of AINode can be found in the document [AINode Deployment](../Deployment-and-Maintenance/AINode_Deployment_apache.md).
67
74
68
75
69
76
## 4. Usage Guidelines
@@ -84,12 +91,12 @@ Models that meet the following criteria can be registered with AINode:
84
91
The SQL syntax for model registration is defined as follows:
85
92
86
93
```SQL
87
-
create model <model_name> using uri <uri>
94
+
create model <model_id> using uri <uri>
88
95
```
89
96
90
97
Detailed meanings of SQL parameters:
91
98
92
-
-**model_name**: The global unique identifier for the model, non-repeating. Model names have the following constraints:
99
+
-**model_id**: The global unique identifier for the model, non-repeating. Model names have the following constraints:
@@ -121,7 +128,7 @@ In addition to registering local model files, remote resource paths can be speci
121
128
122
129
#### Example
123
130
124
-
The current example folder contains model.pt (trained model) and config.yaml with the following content:
131
+
The [example folder](https://github.com/apache/iotdb/tree/master/integration-test/src/test/resources/ainode-example) contains model.pt (trained model) and config.yaml with the following content:
125
132
126
133
```YAML
127
134
configs:
@@ -144,12 +151,6 @@ Register the model by specifying this folder as the loading path:
144
151
IoTDB> create model dlinear_example using uri "file://./example"
145
152
```
146
153
147
-
Models can also be downloaded from HuggingFace for registration:
148
-
149
-
```SQL
150
-
IoTDB> create model dlinear_example using uri "https://huggingface.co/google/timesfm-2.0-500m-pytorch"
151
-
```
152
-
153
154
After SQL execution, registration proceeds asynchronously. The registration status can be checked via model display (see Model Display section). The registration success time mainly depends on the model file size.
154
155
155
156
Once registered, the model can be invoked for inference through normal query syntax.
@@ -161,42 +162,58 @@ Successfully registered models can be queried for model-specific information thr
161
162
```SQL
162
163
show models
163
164
164
-
show models <model_name>
165
+
show models <model_id>
165
166
```
166
167
167
168
In addition to displaying all models, specifying a `model_id` shows details of a specific model. The display includes:
Registered models can be deleted via SQL, which removes all related files under AINode:
@@ -248,7 +265,7 @@ The following machine learning models are currently built-in, please refer to th
248
265
249
266
After completing the registration of the model, the inference function can be used by calling the inference function through the call keyword, and its corresponding parameters are described as follows:
250
267
251
-
-**model_name**: corresponds to a registered model
268
+
-**model_id**: corresponds to a registered model
252
269
-**sql**: sql query statement, the result of the query is used as input to the model for model inference. The dimensions of the rows and columns in the result of the query need to match the size specified in the specific model config. (It is not recommended to use the `SELECT *` clause for the sql here because in IoTDB, `*` does not sort the columns, so the order of the columns is undefined, you can use `SELECT s0,s1` to ensure that the columns order matches the expectations of the model input)
253
270
-**window_function**: Window functions that can be used in the inference process, there are currently three types of window functions provided to assist in model inference:
254
271
-**head(window_size)**: Get the top window_size points in the data for model inference, this window can be used for data cropping.
@@ -392,6 +409,11 @@ Total line number = 4
392
409
393
410
In the result set, each row's label corresponds to the output of the anomaly detection model after inputting each group of 24 rows of data.
394
411
412
+
413
+
### 4.5 Time Series Large Model Import Steps
414
+
415
+
AINode supports multiple time series large models. For deployment, refer to [Time Series Large Model](../AI-capability/TimeSeries-Large-Model.md)
416
+
395
417
## 5. Privilege Management
396
418
397
419
When using AINode related functions, the authentication of IoTDB itself can be used to do a permission management, users can only use the model management related functions when they have the USE_MODEL permission. When using the inference function, the user needs to have the permission to access the source sequence corresponding to the SQL of the input model.
0 commit comments