diff --git a/pyproject.toml b/pyproject.toml index 7a17bb8..9dcbcf8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ dependencies = [ "scikit-learn>=1.5.2", "xgboost>=2.1.0", "lightgbm>=4.5.0", + "torch==2.5.1", # 工具 "openpyxl>=3.1.5", @@ -27,15 +28,11 @@ dependencies = [ ] [project.optional-dependencies] -# PyTorch 为可选依赖(安装约 800MB,仅训练神经网络时需要) -torch = [ - "torch==2.5.1", -] dev = [ # 测试工具 "pytest>=7.0", - "black>=22.0", # 代码格式化 - "mypy>=1.0", # 类型检查 + "black>=22.0", + "mypy>=1.0", ] [build-system] diff --git a/requirements.txt b/requirements.txt index fdd0674..f5e4f58 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,8 @@ pandas>=2.2.0 xgboost>=2.1.0 lightgbm>=4.5.0 scikit-learn>=1.5.2 +torch==2.5.1 openpyxl>=3.1.5 python-dotenv>=1.0.0 +requests>=2.31.0