doc: add error code in doc. (#30615)
This commit is contained in:
parent
2d2e6c8f54
commit
aeb30e2141
|
@ -560,17 +560,18 @@ This document details the server error codes that may be encountered when using
|
|||
|
||||
## TDgpt
|
||||
|
||||
| Error Code | Description | Possible Error Scenarios or Reasons | Recommended Actions for Users |
|
||||
| ---------- | --------------------- | -------------------------------------------------------------------------------- | ------------------------------ |
|
||||
| 0x80000440 | Analysis service response is NULL | The response content is empty | Check the taosanode.app.log for detailed response information |
|
||||
| 0x80000441 | Analysis service can't access | Service is not work correctly, or network is broken | Check the status of taosanode and network status |
|
||||
| 0x80000442 | Analysis algorithm is missing | Algorithm used in analysis is not specified | Add the "algo" parameter in forecast function or anomaly_window clause |
|
||||
| 0x80000443 | Analysis algorithm not loaded | The specified algorithm is not available | Check for the specified algorithm |
|
||||
| 0x80000444 | Analysis invalid buffer type | The buffered data type is invalid | Check the taosanode.app.log for more details |
|
||||
| 0x80000445 | Analysis failed since anode return error | The responses from anode with error message | Check the taosanode.app.log for more details |
|
||||
| 0x80000446 | Analysis failed since too many input rows for anode | Input data is too many | Reduce the rows of input data to below than the threshold |
|
||||
| 0x80000447 | white-noise data not processed | white noise data is not processed | Ignore the white noise check or use another input data |
|
||||
| 0x80000448 | Analysis internal error, not processed | Internal error occurs | Check the taosanode.app.log for more details |
|
||||
| Error Code | Description | Possible Error Scenarios or Reasons | Recommended Actions for Users |
|
||||
|------------|-----------------------------------------------------|-----------------------------------------------------|------------------------------------------------------------------------|
|
||||
| 0x80000440 | Analysis service response is NULL | The response content is empty | Check the taosanode.app.log for detailed response information |
|
||||
| 0x80000441 | Analysis service can't access | Service is not work correctly, or network is broken | Check the status of taosanode and network status |
|
||||
| 0x80000442 | Analysis algorithm is missing | Algorithm used in analysis is not specified | Add the "algo" parameter in forecast function or anomaly_window clause |
|
||||
| 0x80000443 | Analysis algorithm not loaded | The specified algorithm is not available | Check for the specified algorithm |
|
||||
| 0x80000444 | Analysis invalid buffer type | The buffered data type is invalid | Check the taosanode.app.log for more details |
|
||||
| 0x80000445 | Analysis failed since anode return error | The responses from anode with error message | Check the taosanode.app.log for more details |
|
||||
| 0x80000446 | Analysis failed since too many input rows for anode | Input data is too many | Reduce the rows of input data to below than the threshold |
|
||||
| 0x80000447 | white-noise data not processed | white noise data is not processed | Ignore the white noise check or use another input data |
|
||||
| 0x80000448 | Analysis internal error, not processed | Internal error occurs | Check the taosanode.app.log for more details |
|
||||
| 0x80000449 | Analysis failed since not enough rows | Input data for forecasting are not enough | Increase the number of input rows (10 rows for forecasting at least) |
|
||||
|
||||
|
||||
## virtual table
|
||||
|
|
|
@ -91,7 +91,8 @@ curl 127.0.0.1:5001/ds_predict
|
|||
```
|
||||
|
||||
# 添加模型适配代码
|
||||
您可参考 [timemoe.py](https://github.com/taosdata/TDengine/blob/main/tools/tdgpt/taosanalytics/algo/fc/timemoe.pyd) 文件进行 MaaS 服务的适配。我们适配 Time-MoE 提供预测服务。
|
||||
您可参考 [timemoe.py](https://github.com/taosdata/TDengine/blob/main/tools/tdgpt/taosanalytics/algo/fc/timemoe.py)
|
||||
文件进行 MaaS 服务的适配。我们适配 Time-MoE 提供预测服务。
|
||||
|
||||
```python
|
||||
class _TimeMOEService(AbstractForecastService):
|
||||
|
|
|
@ -17,6 +17,12 @@ anode 采用类动态加载模式,在启动的时候扫描特定目录内满
|
|||
|
||||
以下内容将说明如何将分析算法添加到 anode 中并能够通过 SQL 语句进行调用。
|
||||
|
||||
## 环境准备
|
||||
|
||||
建议进行进行分析模型开发的研发人员首先从 github 上克隆 [TDengine 社区版本](https://github.com/taosdata/tdengine) 源代码。
|
||||
在克隆到本地的源代码目录中,TDgpt 的源代码位于 `./tools/tdgpt` 。[PyCharm 社区版](https://www.jetbrains.com/pycharm/download)
|
||||
直接打开该目录即可以进行开发。
|
||||
|
||||
## 目录结构
|
||||
|
||||
anode 的主要目录结构如下图所示
|
||||
|
@ -37,17 +43,17 @@ anode 的主要目录结构如下图所示
|
|||
└── venv -> /var/lib/taos/taosanode/venv
|
||||
```
|
||||
|
||||
| 目录 | 说明 |
|
||||
| ------------- | ------------------------------------------------------------------------------------------- |
|
||||
| taosanalytics | 源代码目录,其下包含了算法具体保存目录 algo,放置杂项目录 misc,单元测试和集成测试目录 test。algo 目录下 ad 保存异常检测算法代码,fc 目录保存预测算法代码 |
|
||||
| venv | Python 虚拟环境 |
|
||||
| model | 放置针对数据集完成的训练模型 |
|
||||
| cfg | 配置文件目录 |
|
||||
| 目录 | 说明 |
|
||||
|---------------|---------------------------------------------------------------------------------------|
|
||||
| taosanalytics | 代码目录,包含模型代码保存目录 algo 和放置杂项目录 misc <br/> 单元测试和集成测试目录 test <br/> 其下的 ad 目录存放异常检测算法代码,fc 目录存放预测算法代码 |
|
||||
| venv | Python 虚拟环境 |
|
||||
| model | 放置针对数据集完成的训练模型 |
|
||||
| cfg | 配置文件目录 |
|
||||
|
||||
## 约定与限制
|
||||
|
||||
- 异常检测算法的 Python 代码文件需放在 `./taos/algo/ad` 目录中
|
||||
- 预测算法 Python 代码文件需要放在 `./taos/algo/fc` 目录中
|
||||
- 异常检测算法 Python 代码文件需放在 `./taos/algo/ad` 目录中
|
||||
- 预测分析算法 Python 代码文件需放在 `./taos/algo/fc` 目录中
|
||||
|
||||
### 类命名规范
|
||||
|
||||
|
@ -56,7 +62,7 @@ anode 采用算法自动加载模式,因此只识别符合命名约定的 Pyth
|
|||
### 类继承约定
|
||||
|
||||
- 异常检测算法需要从 `AbstractAnomalyDetectionService` 继承,并实现其核心抽象方法 `execute`
|
||||
- 预测算法需要从 `AbstractForecastService` 继承,同样需要实现其核心抽象方法 `execute`
|
||||
- 预测分析算法需要从 `AbstractForecastService` 继承,同样需要实现其核心抽象方法 `execute`
|
||||
|
||||
### 类属性初始化
|
||||
|
||||
|
|
|
@ -19,31 +19,30 @@ TDgpt 在企业版中提供预测分析模型和异常检测模型有效性评
|
|||
|
||||
在配置文件 `analytics.ini` 配置文件中设置 `taosd` 服务的连接信息,包括 主机地址、配置文件路径、用户名、登录密码等信息。
|
||||
|
||||
```textmate
|
||||
```ini
|
||||
[taosd]
|
||||
# taosd 服务主机名
|
||||
host = 127.0.0.1
|
||||
# 登录用户名
|
||||
user = root
|
||||
|
||||
[taosd]
|
||||
# taosd 服务主机名
|
||||
host = 127.0.0.1
|
||||
# 登录用户名
|
||||
user = root
|
||||
# 登录密码
|
||||
password = taosdata
|
||||
|
||||
# 登录密码
|
||||
password = taosdata
|
||||
# 配置文件路径
|
||||
conf = /etc/taos/taos.cfg
|
||||
|
||||
# 配置文件路径
|
||||
conf = /etc/taos/taos.cfg
|
||||
[input_data]
|
||||
|
||||
[input_data]
|
||||
# 用于预测评估的数据库名称
|
||||
db_name = test
|
||||
|
||||
# 用于预测评估的数据库名称
|
||||
db_name = test
|
||||
# 读取数据的表名称
|
||||
table_name = passengers
|
||||
|
||||
# 读取数据的表名称
|
||||
table_name = passengers
|
||||
|
||||
# 读取列名称
|
||||
column_name = val, _c0
|
||||
```
|
||||
# 读取列名称
|
||||
column_name = val, _c0
|
||||
```
|
||||
|
||||
### 评估预测分析模型
|
||||
|
||||
|
|
|
@ -594,14 +594,15 @@ description: TDengine 服务端的错误码列表和详细说明
|
|||
|
||||
## TDgpt
|
||||
|
||||
| 错误码 | 错误描述 | 可能的出错场景或者可能的原因 | 建议用户采取的措施 |
|
||||
| ---------- | --------------------- | -------------------------------------------------------------------------------- | ------------------------------ |
|
||||
| 0x80000440 | Analysis service response is NULL | 分析服务返回错误 | 检查服务端日志确认返回信息是否正确 |
|
||||
| 0x80000441 | Analysis service can't access | 分析服务无法使用 | 检查 anoded 服务是否可用 |
|
||||
| 0x80000442 | Analysis algorithm is missing | 未指定分析算法名称 | 增加算法名称 |
|
||||
| 0x80000443 | Analysis algorithm not loaded | 指定算法未加载 | 指定算法未加载 |
|
||||
| 0x80000444 | Analysis invalid buffer type | 缓存数据格式不对 | 具体查看 server 端的错误日志 |
|
||||
| 0x80000445 | Analysis failed since anode return error | anode 返回错误信息 | 请检查服务端日志确认问题原因 |
|
||||
| 0x80000446 | Analysis failed since too many input rows for anode | 输入数据太多 | 减小分析数据输入规模 |
|
||||
| 0x80000447 | white-noise data not processed | 白噪声数据不分析 | |
|
||||
| 0x80000448 | Analysis internal error, not processed | anode 出现内部错误 | 具体查看 server 端的日志 (taosanode.app.log) |
|
||||
| 错误码 | 错误描述 | 可能的出错场景或者可能的原因 | 建议用户采取的措施 |
|
||||
|------------|-----------------------------------------------------|----------------|--------------------------------------|
|
||||
| 0x80000440 | Analysis service response is NULL | 分析服务返回错误 | 检查服务端日志确认返回信息是否正确 |
|
||||
| 0x80000441 | Analysis service can't access | 分析服务无法使用 | 检查 anoded 服务是否可用 |
|
||||
| 0x80000442 | Analysis algorithm is missing | 未指定分析算法名称 | 增加算法名称 |
|
||||
| 0x80000443 | Analysis algorithm not loaded | 指定算法未加载 | 指定算法未加载 |
|
||||
| 0x80000444 | Analysis invalid buffer type | 缓存数据格式不对 | 具体查看 server 端的错误日志 |
|
||||
| 0x80000445 | Analysis failed since anode return error | anode 返回错误信息 | 请检查服务端日志确认问题原因 |
|
||||
| 0x80000446 | Analysis failed since too many input rows for anode | 输入数据太多 | 减小分析数据输入规模 |
|
||||
| 0x80000447 | white-noise data not processed | 白噪声数据不分析 | |
|
||||
| 0x80000448 | Analysis internal error, not processed | anode 出现内部错误 | 具体查看 server 端的日志 (taosanode.app.log) |
|
||||
| 0x80000449 | Analysis failed since not enough rows | 预测分析输入数据行数太少 | 增加输入数据规模(预测至少 10 行记录) |
|
||||
|
|
Loading…
Reference in New Issue