fix: 精简 requirements.txt,移除未使用的依赖
移除的依赖: - gluonts: 项目中未使用 - pytorch-lightning: 非必需 - torchmetrics: 非必需 - onnx/onnxruntime: 非核心功能 - sqlalchemy: 使用 pymysql 直连 - jupyter/matplotlib/seaborn/pytest: 开发工具,非运行必需 保留的核心依赖: - pandas, numpy, scikit-learn: 数据处理 - granite-tsfm: TTM-R2 模型 - pandas-ta: 技术指标 - fastapi, uvicorn: API 服务 - httpx, python-binance: 数据获取 - schedule: 任务调度 - pymysql, cryptography: 数据库 注意:PyTorch 需要单独安装(Windows 用 CPU 版本)
This commit is contained in:
1 parent
9320b79730
commit
5ca1779d7d
2 files changed
+8
-34
No files matched your search
+4
-8
@@ -34,18 +34,14 @@ echo [3/6] 安装 PyTorch (CPU 版本)...
|
|||||||
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo [4/6] 安装项目依赖...
|
echo [4/5] 安装项目依赖...
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo [5/6] 安装 IBM TTM-R2 模型库...
|
echo [5/5] 验证安装...
|
||||||
echo 包名: granite-tsfm (导入时用 tsfm_public)
|
|
||||||
pip install granite-tsfm
|
|
||||||
|
|
||||||
echo.
|
|
||||||
echo [6/6] 验证安装...
|
|
||||||
python -c "import torch; print(f'PyTorch: {torch.__version__}')"
|
python -c "import torch; print(f'PyTorch: {torch.__version__}')"
|
||||||
python -c "import tsfm_public; print('tsfm_public: 已安装')"
|
python -c "from tsfm_public.models.tinytimemixer import TinyTimeMixerForPrediction; print('TTM-R2: 已安装')"
|
||||||
|
python -c "import pandas_ta; print('pandas-ta: 已安装')"
|
||||||
python -c "from training.config import TrainingConfig; c=TrainingConfig(); print(f'设备: {c.get_device()}')"
|
python -c "from training.config import TrainingConfig; c=TrainingConfig(); print(f'设备: {c.get_device()}')"
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
|
|||||||
+4
-26
@@ -4,15 +4,11 @@
|
|||||||
# ==============================================
|
# ==============================================
|
||||||
|
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# PyTorch (根据平台安装)
|
# PyTorch (根据平台单独安装)
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# macOS: pip install torch torchvision torchaudio
|
# macOS: pip install torch torchvision torchaudio
|
||||||
# Windows CPU: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
# Windows CPU: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
||||||
torch>=2.0.0
|
# 注意:requirements.txt 中不包含 torch,需要手动安装
|
||||||
torchvision>=0.15.0
|
|
||||||
torchaudio>=2.0.0
|
|
||||||
pytorch-lightning>=2.0.0
|
|
||||||
torchmetrics>=1.0.0
|
|
||||||
|
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# 数据处理
|
# 数据处理
|
||||||
@@ -25,22 +21,14 @@ pytz
|
|||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# 时序模型
|
# 时序模型
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# IBM Granite TTM-R2 (PyPI 包名: granite-tsfm)
|
# IBM Granite TTM-R2 (导入名: tsfm_public)
|
||||||
granite-tsfm>=0.3.0
|
granite-tsfm>=0.3.0
|
||||||
# GluonTS 时序工具
|
|
||||||
gluonts[torch]>=0.14.0
|
|
||||||
|
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# 技术指标
|
# 技术指标
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
pandas-ta>=0.3.14b
|
pandas-ta>=0.3.14b
|
||||||
|
|
||||||
# ----------------------------------------------
|
|
||||||
# ONNX 模型导出
|
|
||||||
# ----------------------------------------------
|
|
||||||
onnx>=1.14.0
|
|
||||||
onnxruntime>=1.15.0
|
|
||||||
|
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# API 服务
|
# API 服务
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
@@ -68,7 +56,6 @@ schedule>=1.2.0
|
|||||||
# 数据库
|
# 数据库
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
pymysql>=1.1.0
|
pymysql>=1.1.0
|
||||||
sqlalchemy>=2.0.0
|
|
||||||
cryptography>=41.0.0
|
cryptography>=41.0.0
|
||||||
|
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
@@ -77,15 +64,6 @@ cryptography>=41.0.0
|
|||||||
python-dotenv>=1.0.0
|
python-dotenv>=1.0.0
|
||||||
|
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# 开发工具 (可选)
|
# 进度条
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
jupyter>=1.0.0
|
|
||||||
matplotlib>=3.7.0
|
|
||||||
seaborn>=0.12.0
|
|
||||||
pytest>=7.4.0
|
|
||||||
tqdm>=4.66.0
|
tqdm>=4.66.0
|
||||||
|
|
||||||
# ----------------------------------------------
|
|
||||||
# Polymarket 交易 (可选,需要手动安装)
|
|
||||||
# ----------------------------------------------
|
|
||||||
# pip install py-clob-client
|
|
||||||
Reference in new issue
Block a user