chore: PyTorch改为正式依赖,不再作为可选

This commit is contained in:
tian 2026-06-10 09:50:46 +08:00
parent 531cff509d
commit 67b370364e
2 changed files with 5 additions and 6 deletions

View File

@ -19,6 +19,7 @@ dependencies = [
"scikit-learn>=1.5.2", "scikit-learn>=1.5.2",
"xgboost>=2.1.0", "xgboost>=2.1.0",
"lightgbm>=4.5.0", "lightgbm>=4.5.0",
"torch==2.5.1",
# 工具 # 工具
"openpyxl>=3.1.5", "openpyxl>=3.1.5",
@ -27,15 +28,11 @@ dependencies = [
] ]
[project.optional-dependencies] [project.optional-dependencies]
# PyTorch 为可选依赖(安装约 800MB仅训练神经网络时需要
torch = [
"torch==2.5.1",
]
dev = [ dev = [
# 测试工具 # 测试工具
"pytest>=7.0", "pytest>=7.0",
"black>=22.0", # 代码格式化 "black>=22.0",
"mypy>=1.0", # 类型检查 "mypy>=1.0",
] ]
[build-system] [build-system]

View File

@ -7,6 +7,8 @@ pandas>=2.2.0
xgboost>=2.1.0 xgboost>=2.1.0
lightgbm>=4.5.0 lightgbm>=4.5.0
scikit-learn>=1.5.2 scikit-learn>=1.5.2
torch==2.5.1
openpyxl>=3.1.5 openpyxl>=3.1.5
python-dotenv>=1.0.0 python-dotenv>=1.0.0
requests>=2.31.0