From 67b370364e53cf525e255bbbc1c7d11b20bd4f78 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Wed, 10 Jun 2026 09:50:46 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20PyTorch=E6=94=B9=E4=B8=BA=E6=AD=A3?= =?UTF-8?q?=E5=BC=8F=E4=BE=9D=E8=B5=96=EF=BC=8C=E4=B8=8D=E5=86=8D=E4=BD=9C?= =?UTF-8?q?=E4=B8=BA=E5=8F=AF=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 9 +++------ requirements.txt | 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) 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