Files

51 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ts-anomaly-td
TDengine 时序异常分析 CLI 工具——通过 TDengine 内置 TDgpt SQL 函数跑通异常检测、预测与 GT 对比可视化。
## 安装
```bash
uv sync
```
## CLI 用法
```bash
# 注入数据
python -m ts_anomaly_td inject --csv data/finance_001.csv --stable finance_001
# 批量检测(6 算法多路跑)
python -m ts_anomaly_td detect-batch --stable finance_001 --output render/
# 预测式异常
python -m ts_anomaly_td forecast-anomaly --stable finance_001 --output render/
# 端到端
python -m ts_anomaly_td e2e --data-dir data --output-dir render --log-dir logs/
# 准实时监控
python -m ts_anomaly_td watch --stable finance_001 --window-sec 30
```
## E2E 步骤
```bash
# 1. 拉容器
docker compose up -d
# 等健康检查通过(约 30s
# 2. 跑 E2E
uv run python -m ts_anomaly_td e2e --data-dir data --output-dir render --log-dir logs/
# 3. 停止容器
docker compose down
```
## License
Apache-2.0。运行 E2E 时需链接 AGPL-3.0 的 TDengine 服务,请遵守对应条款。
## 仓库
Gitea: https://git.tekmine.net/charles/ts-anomaly-td