Skip to content

Commit 7af960e

Browse files
authored
fix(deps): move tqdm, pyyaml, numpy from heavy extras into core (#118)
tqdm, pyyaml and numpy are light, pure-Python utilities that the umbrella CLI (`pixelrag chunk`, `pixelrag index`) and the torch-free stage code import at module load: chunk.py, index/config.py, and embed.py (which deliberately lazy-imports torch but imports numpy/tqdm at the top). Gating them behind the heavy `embed`/`index` extras forced a torch install for light operations and made those modules fail to import on a core-only install — which is why the test suite (deliberately torch-free; no test imports torch/faiss/transformers) hit ModuleNotFoundError at collection time on `uv sync --extra dev`. Move the three into core dependencies and drop the now-redundant copies from the embed/serve/index/eval extras. "Core stays light (no torch)" still holds — these are not torch/GPU deps — and the suite now imports cleanly with no skips or CI changes.
1 parent 2d0ff8a commit 7af960e

2 files changed

Lines changed: 14 additions & 20 deletions

File tree

pyproject.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ dependencies = [
2121
"pyturbojpeg>=2.2.0",
2222
"cef-capi-py>=131.3.5",
2323
"anthropic>=0.102.0",
24+
# Light, pure-Python utilities the umbrella CLI and the non-torch stage code
25+
# (chunk / config parsing / progress bars) import at module load. Kept in core
26+
# — not the heavy `embed`/`index` extras — so `pixelrag chunk`, `pixelrag index`,
27+
# and the torch-free test suite import cleanly without pulling torch/faiss.
28+
"numpy>=1.26.0",
29+
"pyyaml>=6.0",
30+
"tqdm>=4.60.0",
2431
]
2532

2633
[project.optional-dependencies]
@@ -29,20 +36,17 @@ embed = [
2936
"torchvision>=0.24.0",
3037
"transformers>=4.57.0",
3138
"faiss-cpu>=1.9.0",
32-
"numpy>=1.26.0",
33-
"tqdm>=4.60.0",
3439
]
3540
serve = [
3641
"fastapi>=0.115.0",
3742
"uvicorn>=0.30.0",
38-
"numpy>=1.26.0",
3943
"faiss-cpu>=1.9.0",
4044
"transformers>=4.57.0",
4145
"torch>=2.9.0",
4246
"qwen-vl-utils",
4347
"pydantic>=2.0.0",
4448
]
45-
index = ["pixelrag[embed]", "pyyaml>=6.0", "markdown>=3.4"]
49+
index = ["pixelrag[embed]", "markdown>=3.4"]
4650
all = ["pixelrag[embed,serve,index]"]
4751
gpu = ["faiss-gpu-cu12>=1.13.2; sys_platform == 'linux'"]
4852
playwright = ["playwright>=1.40.0"]
@@ -52,7 +56,6 @@ distributed = ["boto3>=1.42.0"]
5256
eval = [
5357
"pandas>=2.0",
5458
"Pillow>=10.0",
55-
"tqdm>=4.60",
5659
"trafilatura>=1.6",
5760
"openai>=1.0",
5861
"aiohttp>=3.9",

uv.lock

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

0 commit comments

Comments
 (0)