refactor: 重新整理 requirements.txt
主要更改: - 修正 TTM 模型包名: tsfm_public -> granite-tsfm - 添加缺失依赖: httpx, schedule, pytorch-lightning, torchmetrics - 移除过时依赖: darts, u8darts - 按功能分类组织依赖 - 添加 Windows/macOS 安装说明注释 - 更新安装脚本和文档中的包名
This commit is contained in:
1 parent
06800ddb43
commit
9320b79730
3 files changed
+76
-31
No files matched your search
@@ -94,14 +94,13 @@ pip install -r requirements.txt
|
|||||||
### 3. 安装 IBM 时序模型 (TTM-R2)
|
### 3. 安装 IBM 时序模型 (TTM-R2)
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# 注意:PyPI 包名是 tsfm-public(带连字符),但导入时用 tsfm_public(下划线)
|
# PyPI 包名是 granite-tsfm,导入时用 tsfm_public
|
||||||
pip install tsfm-public
|
pip install granite-tsfm
|
||||||
```
|
```
|
||||||
|
|
||||||
如果安装失败,尝试:
|
验证安装:
|
||||||
```powershell
|
```powershell
|
||||||
# 从 GitHub 安装
|
python -c "from tsfm_public.models.tinytimemixer import TinyTimeMixerForPrediction; print('TTM-R2 安装成功')"
|
||||||
pip install git+https://github.com/ibm-granite/granite-tsfm.git
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
+2
-2
@@ -39,8 +39,8 @@ pip install -r requirements.txt
|
|||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo [5/6] 安装 IBM TTM-R2 模型库...
|
echo [5/6] 安装 IBM TTM-R2 模型库...
|
||||||
echo 注意: tsfm-public 包名使用连字符
|
echo 包名: granite-tsfm (导入时用 tsfm_public)
|
||||||
pip install tsfm-public
|
pip install granite-tsfm
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo [6/6] 验证安装...
|
echo [6/6] 验证安装...
|
||||||
|
|||||||
+70
-24
@@ -1,45 +1,91 @@
|
|||||||
# Core dependencies
|
# ==============================================
|
||||||
|
# 加密货币预测系统依赖
|
||||||
|
# Python 3.12 | 支持 macOS (MPS) 和 Windows (CPU)
|
||||||
|
# ==============================================
|
||||||
|
|
||||||
|
# ----------------------------------------------
|
||||||
|
# PyTorch (根据平台安装)
|
||||||
|
# ----------------------------------------------
|
||||||
|
# macOS: pip install torch torchvision torchaudio
|
||||||
|
# Windows CPU: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
||||||
torch>=2.0.0
|
torch>=2.0.0
|
||||||
torchvision
|
torchvision>=0.15.0
|
||||||
torchaudio
|
torchaudio>=2.0.0
|
||||||
python-binance>=1.0.19
|
pytorch-lightning>=2.0.0
|
||||||
|
torchmetrics>=1.0.0
|
||||||
|
|
||||||
|
# ----------------------------------------------
|
||||||
|
# 数据处理
|
||||||
|
# ----------------------------------------------
|
||||||
pandas>=2.0.0
|
pandas>=2.0.0
|
||||||
numpy>=1.24.0
|
numpy>=1.24.0
|
||||||
scikit-learn>=1.3.0
|
scikit-learn>=1.3.0
|
||||||
pytz
|
pytz
|
||||||
python-dotenv>=1.0.0
|
|
||||||
|
|
||||||
# ONNX
|
# ----------------------------------------------
|
||||||
|
# 时序模型
|
||||||
|
# ----------------------------------------------
|
||||||
|
# IBM Granite TTM-R2 (PyPI 包名: granite-tsfm)
|
||||||
|
granite-tsfm>=0.3.0
|
||||||
|
# GluonTS 时序工具
|
||||||
|
gluonts[torch]>=0.14.0
|
||||||
|
|
||||||
|
# ----------------------------------------------
|
||||||
|
# 技术指标
|
||||||
|
# ----------------------------------------------
|
||||||
|
pandas-ta>=0.3.14b
|
||||||
|
|
||||||
|
# ----------------------------------------------
|
||||||
|
# ONNX 模型导出
|
||||||
|
# ----------------------------------------------
|
||||||
onnx>=1.14.0
|
onnx>=1.14.0
|
||||||
onnxruntime>=1.15.0
|
onnxruntime>=1.15.0
|
||||||
|
|
||||||
# Model-specific dependencies
|
# ----------------------------------------------
|
||||||
darts>=0.27.0
|
# API 服务
|
||||||
u8darts[torch]>=0.27.0
|
# ----------------------------------------------
|
||||||
tsfm_public>=0.2.0
|
|
||||||
gluonts[torch]>=0.14.0
|
|
||||||
|
|
||||||
# API dependencies
|
|
||||||
fastapi>=0.104.0
|
fastapi>=0.104.0
|
||||||
uvicorn[standard]>=0.24.0
|
uvicorn[standard]>=0.24.0
|
||||||
pydantic>=2.0.0
|
pydantic>=2.0.0
|
||||||
python-multipart>=0.0.6
|
python-multipart>=0.0.6
|
||||||
|
|
||||||
# Technical indicators
|
# ----------------------------------------------
|
||||||
pandas-ta>=0.3.14b
|
# HTTP 客户端
|
||||||
|
# ----------------------------------------------
|
||||||
|
httpx>=0.25.0
|
||||||
|
|
||||||
# Development tools
|
# ----------------------------------------------
|
||||||
|
# 数据源
|
||||||
|
# ----------------------------------------------
|
||||||
|
python-binance>=1.0.19
|
||||||
|
|
||||||
|
# ----------------------------------------------
|
||||||
|
# 任务调度
|
||||||
|
# ----------------------------------------------
|
||||||
|
schedule>=1.2.0
|
||||||
|
|
||||||
|
# ----------------------------------------------
|
||||||
|
# 数据库
|
||||||
|
# ----------------------------------------------
|
||||||
|
pymysql>=1.1.0
|
||||||
|
sqlalchemy>=2.0.0
|
||||||
|
cryptography>=41.0.0
|
||||||
|
|
||||||
|
# ----------------------------------------------
|
||||||
|
# 环境变量
|
||||||
|
# ----------------------------------------------
|
||||||
|
python-dotenv>=1.0.0
|
||||||
|
|
||||||
|
# ----------------------------------------------
|
||||||
|
# 开发工具 (可选)
|
||||||
|
# ----------------------------------------------
|
||||||
jupyter>=1.0.0
|
jupyter>=1.0.0
|
||||||
matplotlib>=3.7.0
|
matplotlib>=3.7.0
|
||||||
seaborn>=0.12.0
|
seaborn>=0.12.0
|
||||||
pytest>=7.4.0
|
pytest>=7.4.0
|
||||||
black>=23.0.0
|
|
||||||
flake8>=6.0.0
|
|
||||||
|
|
||||||
# Utilities
|
|
||||||
tqdm>=4.66.0
|
tqdm>=4.66.0
|
||||||
|
|
||||||
# Database
|
# ----------------------------------------------
|
||||||
pymysql>=1.1.0
|
# Polymarket 交易 (可选,需要手动安装)
|
||||||
sqlalchemy>=2.0.0
|
# ----------------------------------------------
|
||||||
cryptography>=41.0.0
|
# pip install py-clob-client
|
||||||
Reference in new issue
Block a user