Skip to content

Commit db83f97

Browse files
author
sindchad
committed
Fix pyproject.toml for CI (GPU deps moved to gpu group)
1 parent fdfeced commit db83f97

File tree

2 files changed

+62
-46
lines changed

2 files changed

+62
-46
lines changed

pyproject.toml

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,22 @@ authors = [{ name = "Sindhuja Chaduvula", email = "sindhuja.chaduvula@vectorinst
77
license = "MIT"
88
requires-python = ">=3.10,<3.12"
99

10+
# -----------------------------------------------------
11+
# Main dependencies (CI-safe, CPU-safe)
12+
# -----------------------------------------------------
1013
dependencies = [
11-
# --- Your ML project dependencies ---
1214
"python-dotenv==1.1",
13-
"torch==2.6.0+cu124",
14-
"torchaudio==2.6.0+cu124",
15-
"torchvision==0.21.0+cu124",
1615
"cmake==4.1.0",
1716
"ninja>=1.13.0",
1817
"pyarrow==15.0.2",
19-
"unsloth[colab-new]",
2018
"einops>=0.8.1",
2119
"setuptools>=80.9.0",
2220
"wheel>=0.45.1",
2321
"build>=1.3.0",
2422
"trl==0.22.2",
2523
"peft>=0.17.1",
2624
"accelerate==1.10.1",
27-
"bitsandbytes==0.48.1",
28-
"unsloth-zoo>=2025.10.10",
2925
"wandb>=0.22.2",
30-
"flash-attn==2.7.3",
3126
"sentence-transformers>=5.1.2",
3227
"openai>=2.6.1",
3328
"pydantic-settings>=2.11.0",
@@ -38,17 +33,25 @@ dependencies = [
3833
"opik>=1.9.33",
3934
]
4035

41-
[build-system]
42-
requires = ["hatchling"]
43-
build-backend = "hatchling.build"
44-
45-
[tool.hatch.build.targets.wheel]
46-
packages = ["src/aixpert"]
47-
48-
# ------------------------------------------------
49-
# Dependency groups (required by CI)
50-
# ------------------------------------------------
36+
# GPU-only dependencies MUST NOT be installed in CI
37+
# -----------------------------------------------------
38+
# These are installed only locally on GPU machines:
39+
#
40+
# uv sync --group gpu
41+
#
5142
[dependency-groups]
43+
gpu = [
44+
"torch==2.6.0+cu124",
45+
"torchaudio==2.6.0+cu124",
46+
"torchvision==0.21.0+cu124",
47+
"bitsandbytes==0.48.1",
48+
"flash-attn==2.7.3",
49+
"unsloth[colab-new]",
50+
"unsloth-zoo>=2025.10.10",
51+
]
52+
53+
# Dev tools for linting, formatting, testing
54+
# -----------------------------------------------------
5255
dev = [
5356
"codecov>=2.1.13",
5457
"mypy>=1.14.1",
@@ -63,6 +66,8 @@ dev = [
6366
"types-pyyaml>=6.0.12.20250822",
6467
]
6568

69+
# Documentation dependencies (MkDocs)
70+
# -----------------------------------------------------
6671
docs = [
6772
"jinja2>=3.1.6",
6873
"mkdocs>=1.6.0",
@@ -73,22 +78,28 @@ docs = [
7378
"ipython>=8.31.0",
7479
]
7580

76-
# ------------------------------------------------
77-
# UV configuration
78-
# ------------------------------------------------
81+
[build-system]
82+
requires = ["hatchling"]
83+
build-backend = "hatchling.build"
84+
85+
[tool.hatch.build.targets.wheel]
86+
packages = ["src/aixpert"]
87+
88+
# -----------------------------------------------------
89+
# UV configuration – CI will install only dev + docs
90+
# -----------------------------------------------------
7991
[tool.uv]
92+
default-groups = ["dev", "docs"]
8093
index-url = "https://pypi.org/simple"
8194
extra-index-url = ["https://download.pytorch.org/whl/cu124"]
8295
index-strategy = "unsafe-best-match"
83-
default-groups = ["dev", "docs"]
8496

8597
[tool.uv.sources]
8698
unsloth = { git = "https://github.com/unslothai/unsloth.git" }
8799

88-
# ------------------------------------------------
89-
# Linting / type checking (required for CI)
90-
# ------------------------------------------------
91-
100+
# -----------------------------------------------------
101+
# Mypy (Static Type Checking)
102+
# -----------------------------------------------------
92103
[tool.mypy]
93104
follow_imports = "normal"
94105
ignore_missing_imports = true
@@ -104,6 +115,9 @@ strict_equality = true
104115
extra_checks = true
105116
mypy_path = "src"
106117

118+
# -----------------------------------------------------
119+
# Ruff (Linting & Formatting)
120+
# -----------------------------------------------------
107121
[tool.ruff]
108122
include = ["*.py", "pyproject.toml", "*.ipynb"]
109123
exclude = []
@@ -141,13 +155,11 @@ convention = "numpy"
141155
[tool.ruff.lint.pycodestyle]
142156
max-doc-length = 88
143157

144-
# ------------------------------------------------
145-
# Pytest & Coverage (CI requirements)
146-
# ------------------------------------------------
158+
# -----------------------------------------------------
159+
# Pytest & Coverage
160+
# -----------------------------------------------------
147161
[tool.pytest.ini_options]
148-
markers = [
149-
"integration_test: marks tests as integration tests",
150-
]
162+
markers = ["integration_test: marks tests as integration tests"]
151163

152164
[tool.coverage.run]
153165
source = ["src/aixpert"]

uv.lock

Lines changed: 18 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)