https://arxiv.org/abs/2606.28344. The end of web parsing. The beginning of scalable pixel-native search. link: https://pixelrag.ai/
feat: Vector search with Qdrant (#111)
Anush1a9ba756204e
diff --git a/README.md b/README.mdindex dd9ed5c..83f3c3e 100644--- a/README.md+++ b/README.md@@ -249,6 +249,59 @@ pixelrag embed --shard-dir ./tiles --output-dir ./embeddings --gpu-ids 0,1pixelrag build-index --embeddings-dir ./embeddings --output-dir ./index```+### Qdrant backend++[Qdrant](https://qdrant.tech) is an open-source vector search engine for high-performance and massive scale. [FAISS](https://ai.meta.com/tools/faiss/) remains the default for local indexes. Use Qdrant for configurable quantization, disk-backed vectors, payload filtering, and one collection shared by multiple PixelRAG servers.++Quantization compresses vectors to reduce memory use and speed up search, with a recall tradeoff that depends on the method and settings.++To configure quantization, pass any Qdrant `quantization_config` object in a JSON file.+See Qdrant's [quantization guide](https://qdrant.tech/documentation/manage-data/quantization/#setting-up-quantization-in-qdrant) for supported methods and parameters.++```json+{+ "scalar": {+ "type": "int8",+ "quantile": 0.99,+ "always_ram": true+ }+}+```++```bash+pip install 'pixelrag[serve,qdrant]' # or 'pixelrag[index,qdrant]'++# Build against a Qdrant server.+# Start one locally with: docker run -p 6333:6333 qdrant/qdrant+pixelrag build-index --embeddings-dir ./embeddings --output-dir ./index \+ --backend qdrant --qdrant-url http://localhost:6333 --collection pixelrag \+ --qdrant-quantization-config ./quantization.json++# Add documents to an existing collection.+pixelrag build-index --embeddings-dir ./more --output-dir ./index \+ --backend qdrant --qdrant-url http://localhost:6333 --collection pixelrag --append++# Replace an existing collection and its configuration.+pixelrag build-index --embeddings-dir ./embeddings --output-dir ./index \+ --backend qdrant --qdrant-url http://localhost:6333 --collection pixelrag --recreate++# Serve the collection. PixelRAG reads the backend from summary.json.+pixelrag serve --index-dir ./index --qdrant-url http://localhost:6333 \+ --qdrant-client-config ./qdrant-client.json --port 30001+```++Configure the orchestrator in `pixelrag.yaml`:++```yaml+index:+ backend: qdrant+ qdrant_url: http://localhost:6333+ collection: pixelrag+ client_config: ./qdrant-client.json+ quantization_config: ./quantization.json+ # Set append: true or recreate: true when the collection already exists.+```+### TrainingFine-tuning lives in `train/` — a **separate uv project** (`wiki-screenshot-training`) with its owndiff --git a/embed/src/pixelrag_embed/index.py b/embed/src/pixelrag_embed/index.pyindex c8fac8d..019767e 100644--- a/embed/src/pixelrag_embed/index.py+++ b/embed/src/pixelrag_embed/index.py@@ -33,6 +33,7 @@ import jsonimport osimport sysimport time+import uuidfrom functools import partialfrom pathlib import Path@@ -243,7 +244,7 @@ def build_ivf(# Summarysummary = {- "backend": "ivf",+ "backend": "faiss","total_vectors": n,"dimension": dim,"nlist": nlist,@@ -263,6 +264,112 @@ def build_ivf(print(f"Summary: {summary_path}")+def build_qdrant(+ embeddings_dir: str,+ output_dir: str,+ url: str | None = None,+ collection: str = "pixelrag",+ api_key: str | None = None,+ client_config: dict | None = None,+ metric: str = "ip",+ quantization_config: dict | None = None,+ append: bool = False,+ recreate: bool = False,+ parallel: int = 1,+ batch: int = 1000,+):+ from pydantic import TypeAdapter+ from qdrant_client import QdrantClient, models++ client_options = dict(client_config or {})+ if url:+ client_options["url"] = url+ if api_key:+ client_options["api_key"] = api_key+ if not any(key in client_options for key in ("url", "host", "location", "path")):+ raise SystemExit(+ "Qdrant requires --qdrant-url or an endpoint in --qdrant-client-config"+ )++ client = QdrantClient(**client_options)+ exists = client.collection_exists(collection)+ if exists and not (append or recreate):+ raise ValueError(+ f"collection {collection!r} already exists. Use --append or --recreate"+ )++ os.makedirs(output_dir, exist_ok=True)+ merged = _merge_all_shards(_load_shards(embeddings_dir))+ vectors = np.ascontiguousarray(merged["embeddings"], dtype=np.float32)+ dim = merged["dim"]++ distance = models.Distance.COSINE if metric == "ip" else models.Distance.EUCLID+ quantization = (+ TypeAdapter(models.QuantizationConfig).validate_python(quantization_config)+ if quantization_config+ else None+ )+ if recreate or not exists:+ if exists:+ client.delete_collection(collection)+ client.create_collection(+ collection,+ vectors_config=models.VectorParams(+ size=dim, distance=distance, on_disk=True+ ),+ quantization_config=quantization,+ )++ # min_tile_height is the only payload filter used during search.+ client.create_payload_index(+ collection, "tile_height", field_schema=models.PayloadSchemaType.INTEGER+ )++ fields = {+ "article_id": merged["article_ids"],+ "tile_index": merged["tile_indices"],+ "chunk_index": merged["chunk_indices"],+ "y_offset": merged["y_offsets"],+ "tile_height": merged["tile_heights"],+ }++ # Qdrant only allows UUIDs and +ve integers as point IDs.+ # Ref: https://qdrant.tech/documentation/manage-data/points/#point-ids+ ids = (+ str(uuid.uuid5(uuid.NAMESPACE_DNS, f"{article_id}:{tile_index}:{chunk_index}"))+ for article_id, tile_index, chunk_index in zip(+ fields["article_id"], fields["tile_index"], fields["chunk_index"]+ )+ )+ payloads = (+ {name: int(values[i]) for name, values in fields.items()}+ for i in range(len(vectors))+ )++ client.upload_collection(+ collection_name=collection,+ vectors=vectors,+ payload=payloads,+ ids=ids,+ parallel=parallel,+ batch_size=batch,+ wait=True,+ )++ total = client.count(collection_name=collection, exact=True).count+ summary = {+ "backend": "qdrant",+ "total_vectors": total,+ "dimension": dim,+ "metric": metric,+ "collection": collection,+ }+ summary_path = os.path.join(output_dir, "summary.json")+ with open(summary_path, "w") as f:+ json.dump(summary, f, indent=2)+ print(f"Uploaded {total:,} points to '{collection}'")++def test_search(index_dir: str, nprobe: int = 128, k: int = 10):"""Test search on a built IVF index."""import faiss@@ -306,7 +413,7 @@ def main():sub = parser.add_subparsers(dest="command", required=True)# build- p_build = sub.add_parser("build", help="Build IVF index (default)")+ p_build = sub.add_parser("build", help="Build a vector index")p_build.add_argument("--embeddings-dir", default="./data/embeddings")p_build.add_argument("--output-dir", default="./output/search_index")p_build.add_argument(@@ -336,6 +443,38 @@ def main():default=-1,help="GPU for K-means training (-1 = CPU only)",)+ p_build.add_argument(+ "--backend",+ choices=["faiss", "qdrant"],+ default="faiss",+ help="Index backend (default: faiss)",+ )+ p_build.add_argument(+ "--qdrant-url", default=None, help="Qdrant server/Cloud URL (qdrant backend)"+ )+ p_build.add_argument("--qdrant-api-key", default=os.environ.get("QDRANT_API_KEY"))+ p_build.add_argument(+ "--qdrant-client-config",+ help="Path to a JSON object of QdrantClient constructor arguments",+ )+ p_build.add_argument(+ "--collection", default="pixelrag", help="Qdrant collection name"+ )+ p_build.add_argument(+ "--qdrant-quantization-config",+ help="Qdrant quantization_config JSON for a new or recreated collection",+ )+ qdrant_mode = p_build.add_mutually_exclusive_group()+ qdrant_mode.add_argument(+ "--append",+ action="store_true",+ help="Upsert into an existing Qdrant collection",+ )+ qdrant_mode.add_argument(+ "--recreate",+ action="store_true",+ help="Delete and recreate an existing Qdrant collection",+ )# testp_test = sub.add_parser("test", help="Test search on built index")@@ -346,15 +485,37 @@ def main():args = parser.parse_args()if args.command == "build":- build_ivf(- args.embeddings_dir,- args.output_dir,- nlist=args.nlist,- nprobe=args.nprobe,- train_sample=args.train_sample,- metric=args.metric,- gpu_id=args.gpu_id,- )+ if args.backend == "qdrant":+ client_config = None+ if args.qdrant_client_config:+ with open(args.qdrant_client_config) as f:+ client_config = json.load(f)+ quantization_config = None+ if args.qdrant_quantization_config:+ with open(args.qdrant_quantization_config) as f:+ quantization_config = json.load(f)+ build_qdrant(+ args.embeddings_dir,+ args.output_dir,+ url=args.qdrant_url,+ collection=args.collection,+ api_key=args.qdrant_api_key,+ client_config=client_config,+ metric=args.metric,+ quantization_config=quantization_config,+ append=args.append,+ recreate=args.recreate,+ )+ else:+ build_ivf(+ args.embeddings_dir,+ args.output_dir,+ nlist=args.nlist,+ nprobe=args.nprobe,+ train_sample=args.train_sample,+ metric=args.metric,+ gpu_id=args.gpu_id,+ )elif args.command == "test":test_search(args.index_dir, nprobe=args.nprobe, k=args.k)diff --git a/index/src/pixelrag_index/pipelines.py b/index/src/pixelrag_index/pipelines.pyindex 0e661a0..fc10571 100644--- a/index/src/pixelrag_index/pipelines.py+++ b/index/src/pixelrag_index/pipelines.py@@ -404,35 +404,54 @@ def build(config: dict, limit: int | None = None, force: bool = False) -> Path:cmd += ["--backend", embed_cfg["backend"]]subprocess.run(cmd, check=True)- # Stage 4: Build FAISS index- # Auto-adjust nlist based on vector count (IVF needs nlist <= n_vectors)- import numpy as np+ # Stage 4: Build the configured search index.+ index_cfg = config.get("index", {})+ backend = index_cfg.get("backend", "faiss")+ cmd = [+ sys.executable,+ "-m",+ "pixelrag_embed.index",+ "build",+ "--embeddings-dir",+ str(embeddings_dir),+ "--output-dir",+ str(output),+ "--backend",+ backend,+ ]+ if backend == "qdrant":+ logger.info("Stage 4/4: Building Qdrant collection...")+ if index_cfg.get("qdrant_url"):+ cmd += ["--qdrant-url", index_cfg["qdrant_url"]]+ if index_cfg.get("collection"):+ cmd += ["--collection", index_cfg["collection"]]+ if index_cfg.get("client_config"):+ cmd += ["--qdrant-client-config", index_cfg["client_config"]]+ if index_cfg.get("quantization_config"):+ cmd += [+ "--qdrant-quantization-config",+ index_cfg["quantization_config"],+ ]+ if index_cfg.get("append"):+ cmd += ["--append"]+ if index_cfg.get("recreate"):+ cmd += ["--recreate"]+ else:+ # Auto-adjust nlist based on vector count (IVF needs nlist <= n_vectors)+ import numpy as np- npz_files = sorted(embeddings_dir.glob("shard_*.npz"))- total_vectors = sum(- np.load(f, mmap_mode="r")["embeddings"].shape[0] for f in npz_files- )- nlist = min(4096, max(1, total_vectors // 40))- logger.info(- "Stage 4/4: Building FAISS index (%d vectors, nlist=%d)...",- total_vectors,- nlist,- )- subprocess.run(- [- sys.executable,- "-m",- "pixelrag_embed.index",- "build",- "--embeddings-dir",- str(embeddings_dir),- "--output-dir",- str(output),- "--nlist",- str(nlist),- ],- check=True,- )+ npz_files = sorted(embeddings_dir.glob("shard_*.npz"))+ total_vectors = sum(+ np.load(f, mmap_mode="r")["embeddings"].shape[0] for f in npz_files+ )+ nlist = min(4096, max(1, total_vectors // 40))+ logger.info(+ "Stage 4/4: Building FAISS index (%d vectors, nlist=%d)...",+ total_vectors,+ nlist,+ )+ cmd += ["--nlist", str(nlist)]+ subprocess.run(cmd, check=True)logger.info("Index built at %s", output)return outputdiff --git a/pyproject.toml b/pyproject.tomlindex ae199d9..2abc237 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -48,7 +48,8 @@ serve = ["pydantic>=2.0.0",]index = ["pixelrag[embed]", "markdown>=3.4"]-all = ["pixelrag[embed,serve,index]"]+qdrant = ["qdrant-client>=1.18.0"]+all = ["pixelrag[embed,serve,index,qdrant]"]gpu = ["faiss-gpu-cu12>=1.13.2; sys_platform == 'linux'"]playwright = ["playwright>=1.40.0"]pdf = ["pdf2image>=1.16.0"]diff --git a/serve/src/pixelrag_serve/api.py b/serve/src/pixelrag_serve/api.pyindex c7bc9cf..f02f8d0 100644--- a/serve/src/pixelrag_serve/api.py+++ b/serve/src/pixelrag_serve/api.py@@ -45,7 +45,6 @@ import timeimport uuidfrom datetime import datetime, timezone-import faissimport numpy as npfrom fastapi import FastAPI, HTTPException, Requestfrom fastapi.middleware.cors import CORSMiddleware@@ -82,13 +81,13 @@ class _RequestIDFilter(logging.Filter):return True-logging.getLogger().addFilter(_RequestIDFilter())-logger = logging.getLogger("search_api")logging.basicConfig(level=logging.INFO,format="%(asctime)s %(levelname)s %(name)s: [%(req)s] %(message)s",)+for handler in logging.getLogger().handlers:+ handler.addFilter(_RequestIDFilter())app = FastAPI(title="PixelRAG Search API")@@ -171,8 +170,13 @@ def _is_meta(url: str) -> bool:return bool(_META_RE.search(url))-def _department_positions(department: str) -> np.ndarray:- """Vector positions (FAISS row ids) belonging to a department, cached per dept."""+def _department_article_ids(department: str) -> np.ndarray:+ """Article ids belonging to a department (articles.json "department" field).++ Backend-agnostic: the ids are handed to VectorBackend.raw_search, which+ turns them into its native pre-filter (FAISS: IDSelector over vector rows;+ Qdrant: payload filter on article_id).+ """dept_to_aids = _state.get("dept_to_aids") or {}if not dept_to_aids:raise HTTPException(@@ -180,32 +184,19 @@ def _department_positions(department: str) -> np.ndarray:detail="Index was built without department metadata; rebuild with ""`pixelrag index build` from a directory-per-department source.",)- cache = _state.setdefault("dept_positions", {})- if department not in cache:- aids = dept_to_aids.get(department)- if aids is None:- raise HTTPException(- status_code=404,- detail=f"Unknown department {department!r}. "- f"Available: {sorted(dept_to_aids)}",- )- article_ids = _state["metadata"]["article_ids"]- cache[department] = np.where(np.isin(article_ids, aids))[0].astype("int64")- return cache[department]---def _department_search_params(department: str, nprobe: int) -> "faiss.SearchParameters":- """Build FAISS search params that pre-filter to one department's vectors."""- sel = faiss.IDSelectorBatch(_department_positions(department))- index = _state["index"]- if isinstance(index, faiss.IndexIVF):- return faiss.SearchParametersIVF(sel=sel, nprobe=nprobe)- return faiss.SearchParameters(sel=sel)+ aids = dept_to_aids.get(department)+ if aids is None:+ raise HTTPException(+ status_code=404,+ detail=f"Unknown department {department!r}. "+ f"Available: {sorted(dept_to_aids)}",+ )+ return aidsclass Hit(BaseModel):score: float- vector_id: int+ vector_id: int | strarticle_id: inttile_index: intchunk_index: int@@ -455,11 +446,9 @@ async def search(req: SearchRequest):query_vectors = _encode_queries(req.queries, req.instruction)t_encode = time.time() - t0- # FAISS search- index = _state["index"]- default_nprobe = index.nprobe- if req.nprobe is not None:- index.nprobe = req.nprobe+ # Search through the configured backend.+ backend = _state["backend"]+ backend.set_nprobe(req.nprobe)# Over-fetch when filtering to ensure enough results after filtering.# Meta pages can be the majority of raw hits, so articles_only needs more.@@ -469,42 +458,42 @@ async def search(req: SearchRequest):fetch_k = req.n_docs * 5else:fetch_k = req.n_docs+ article_filter = Noneif req.department:- # Department pre-filter: FAISS only scores vectors of that department.- params = _department_search_params(req.department, index.nprobe)- distances, indices = index.search(query_vectors, fetch_k, params=params)- else:- distances, indices = index.search(query_vectors, fetch_k)-- if req.nprobe is not None:- index.nprobe = default_nprobe+ # Department pre-filter: the backend scores only that department's+ # vectors (FAISS: IDSelector; Qdrant: payload filter) — a real+ # pre-filter, not post-filtering, so n_docs results are guaranteed+ # when the department has enough tiles.+ article_filter = _department_article_ids(req.department)+ try:+ raw = backend.raw_search(+ query_vectors,+ fetch_k,+ min_tile_height=req.min_tile_height,+ article_ids=article_filter,+ filter_cache_key=f"dept:{req.department}" if req.department else None,+ )+ finally:+ backend.reset_nprobe()t_search = time.time() - t0 - t_encode# Build results- meta = _state["metadata"]- article_ids = meta["article_ids"]- tile_indices = meta["tile_indices"]- chunk_indices = meta["chunk_indices"]- y_offsets = meta["y_offsets"]- tile_heights = meta["tile_heights"]tiles_dir = _state.get("tiles_dir", "")results = []for qi in range(len(req.queries)):hits = []- for j in range(fetch_k):- vid = int(indices[qi, j])- if vid == -1:- continue- th = int(tile_heights[vid])+ for r in raw[qi]:+ vid = r["vector_id"]+ th = r["tile_height"]if req.min_tile_height and th < req.min_tile_height:continue- aid = int(article_ids[vid])+ aid = r["article_id"]url = _resolve_url(aid)if req.articles_only and _is_meta(url):continue- ti = int(tile_indices[vid])- ci = int(chunk_indices[vid])+ ti = r["tile_index"]+ ci = r["chunk_index"]tile_path = _resolve_path(aid, ti, ci)img_b64 = Noneif req.include_images and tile_path and os.path.exists(tile_path):@@ -525,12 +514,12 @@ async def search(req: SearchRequest):rel_path = candidatehits.append(Hit(- score=float(distances[qi, j]),+ score=r["score"],vector_id=vid,article_id=aid,tile_index=ti,chunk_index=ci,- y_offset=int(y_offsets[vid]),+ y_offset=r["y_offset"],tile_height=th,path=rel_path,url=url,@@ -556,12 +545,12 @@ async def search(req: SearchRequest):@app.get("/status", response_model=StatusResponse)async def status():- index = _state["index"]+ backend = _state["backend"]return StatusResponse(- total_vectors=index.ntotal,+ total_vectors=backend.ntotal,dimension=_state["dimension"],- nlist=_state["nlist"],- nprobe=index.nprobe,+ nlist=backend.nlist,+ nprobe=backend.nprobe,model=_state["model_name"],index_dir=_state.get("index_dir", ""),tiles_dir=_state.get("tiles_dir", ""),@@ -589,21 +578,13 @@ async def departments():class ReconstructRequest(BaseModel):- vector_ids: list[int]+ vector_ids: list[int | str]@app.post("/reconstruct")async def reconstruct(req: ReconstructRequest):"""Reconstruct stored embeddings by vector_id (for alignment debugging)."""- index = _state["index"]- # Ensure direct map exists for reconstruct- if not hasattr(index, "_direct_map_built"):- index.make_direct_map()- index._direct_map_built = True- vecs = []- for vid in req.vector_ids:- vecs.append(index.reconstruct(vid).tolist())- return {"embeddings": vecs}+ return {"embeddings": _state["backend"].reconstruct(req.vector_ids)}@app.get("/tile")@@ -640,33 +621,25 @@ def load(args):device = args.devicedtype = torch.float32 if device == "cpu" else torch.bfloat16- # Load FAISS index. PIXELRAG_INDEX_MMAP=1 memory-maps the index instead of reading the- # whole file into RAM — startup is near-instant (no full read of a multi-100G index over- # NFS), and inverted lists are paged in on demand at query time. Great when only a subset- # of the index is touched (e.g. a few hundred eval queries); the OS page cache keeps hot- # lists resident across queries.- index_path = os.path.join(args.index_dir, "index.faiss")- logger.info("Loading FAISS index from %s...", index_path)- t0 = time.time()- if os.environ.get("PIXELRAG_INDEX_MMAP"):- logger.info("(mmap mode: lists paged in on demand)")- index = faiss.read_index(index_path, faiss.IO_FLAG_MMAP)- else:- index = faiss.read_index(index_path)- logger.info("Loaded index: %d vectors in %.1fs", index.ntotal, time.time() - t0)-- # Load metadata- metadata_path = os.path.join(args.index_dir, "metadata.npz")- logger.info("Loading metadata from %s...", metadata_path)- meta = np.load(metadata_path)-- # Load summary+ # Load summary (index loading itself lives in the backend: FaissBackend+ # honors PIXELRAG_INDEX_MMAP for memory-mapped multi-100G indexes).summary_path = os.path.join(args.index_dir, "summary.json")summary = {}if os.path.exists(summary_path):with open(summary_path) as f:summary = json.load(f)+ from .backends import make_backend++ t0 = time.time()+ backend = make_backend(args, summary)+ logger.info(+ "Loaded %s backend: %d vectors in %.1fs",+ backend.name,+ backend.ntotal,+ time.time() - t0,+ )+# Load articles.jsonlogger.info("Loading articles.json from %s...", args.articles_json)with open(args.articles_json) as f:@@ -708,29 +681,33 @@ def load(args):model = model.to(device).eval()logger.info("Model loaded")- # File sizes- index_size = os.path.getsize(index_path)- meta_size = os.path.getsize(metadata_path)-- # Index build time from file mtime- index_mtime = os.path.getmtime(index_path)- index_built_at = datetime.fromtimestamp(index_mtime, tz=timezone.utc).isoformat()+ index_path = os.path.join(args.index_dir, "index.faiss")+ metadata_path = os.path.join(args.index_dir, "metadata.npz")+ if os.path.exists(index_path):+ index_size = os.path.getsize(index_path)+ index_built_at = datetime.fromtimestamp(+ os.path.getmtime(index_path), tz=timezone.utc+ ).isoformat()+ else:+ index_size = 0+ built_path = summary_path if os.path.exists(summary_path) else args.index_dir+ index_built_at = datetime.fromtimestamp(+ os.path.getmtime(built_path), tz=timezone.utc+ ).isoformat()+ meta_size = os.path.getsize(metadata_path) if os.path.exists(metadata_path) else 0_state.update({- "index": index,- "metadata": meta,+ "backend": backend,"articles": articles,"dept_to_aids": {d: np.asarray(v) for d, v in dept_to_aids.items()},- "dept_positions": {},"processor": processor,"model": model,"device": device,"model_name": args.model,"index_dir": args.index_dir,"tiles_dir": args.tiles_dir,- "dimension": summary.get("dimension", index.d),- "nlist": summary.get("nlist", 4096),+ "dimension": backend.dimension,"index_built_at": index_built_at,"index_size_bytes": index_size,"metadata_size_bytes": meta_size,@@ -812,6 +789,29 @@ def main():"--articles-json",default=os.environ.get("PIXELRAG_ARTICLES_JSON", "./articles.json"),)+ parser.add_argument(+ "--backend",+ choices=["faiss", "qdrant"],+ default=None,+ help="Vector backend (default: read from index summary.json, else faiss)",+ )+ parser.add_argument(+ "--qdrant-url", default=None, help="Qdrant server/Cloud URL (qdrant backend)"+ )+ parser.add_argument(+ "--qdrant-api-key",+ default=os.environ.get("QDRANT_API_KEY"),+ help="Qdrant API key",+ )+ parser.add_argument(+ "--qdrant-client-config",+ help="Path to a JSON object of QdrantClient constructor arguments",+ )+ parser.add_argument(+ "--collection",+ default=None,+ help="Qdrant collection name (default: from summary.json, else 'pixelrag')",+ )parser.add_argument("--model", default="Qwen/Qwen3-VL-Embedding-2B")parser.add_argument("--device",@@ -843,6 +843,9 @@ def main():help="kiwix book id for /content/<book>/ (auto-derived from --kiwix-url if omitted)",)args = parser.parse_args()+ if args.qdrant_client_config:+ with open(args.qdrant_client_config) as f:+ args.qdrant_client_config = json.load(f)load(args)diff --git a/serve/src/pixelrag_serve/backends.py b/serve/src/pixelrag_serve/backends.pynew file mode 100644index 0000000..1d60edd--- /dev/null+++ b/serve/src/pixelrag_serve/backends.py@@ -0,0 +1,281 @@+import os+from typing import Any, Protocol, TypedDict, runtime_checkable++_META_FIELDS = ("article_id", "tile_index", "chunk_index", "y_offset", "tile_height")+++class SearchHit(TypedDict):+ score: float+ vector_id: int | str+ article_id: int+ tile_index: int+ chunk_index: int+ y_offset: int+ tile_height: int+++@runtime_checkable+class VectorBackend(Protocol):+ name: str+ dimension: int+ nlist: int+ nprobe: int++ @property+ def ntotal(self) -> int: ...++ def set_nprobe(self, n: int | None) -> None: ...++ def reset_nprobe(self) -> None: ...++ def raw_search(+ self,+ query_vectors: Any,+ k: int,+ min_tile_height: int | None = None,+ article_ids: Any = None,+ filter_cache_key: str | None = None,+ ) -> list[list[SearchHit]]: ...++ def reconstruct(self, vids: list[int | str]) -> list[list[float] | None]: ...+++class FaissBackend:+ name = "faiss"++ def __init__(self, index_dir: str, summary: dict):+ import logging++ import faiss+ import numpy as np++ self._faiss = faiss+ self._np = np+ logger = logging.getLogger("pixelrag-serve")+ index_path = os.path.join(index_dir, "index.faiss")+ # PIXELRAG_INDEX_MMAP=1 memory-maps the index instead of reading the+ # whole file into RAM — startup is near-instant (no full read of a+ # multi-100G index over NFS) and inverted lists are paged in on demand+ # at query time; the OS page cache keeps hot lists resident.+ if os.environ.get("PIXELRAG_INDEX_MMAP"):+ logger.info("Loading FAISS index from %s (mmap)...", index_path)+ self.index = faiss.read_index(index_path, faiss.IO_FLAG_MMAP)+ else:+ logger.info("Loading FAISS index from %s...", index_path)+ self.index = faiss.read_index(index_path)+ self._meta = np.load(os.path.join(index_dir, "metadata.npz"))+ # filter_cache_key -> int64 vector positions for a stable article_ids+ # filter (department filters are reused across every query).+ self._filter_positions: dict[str, Any] = {}+ self.dimension = summary.get("dimension", self.index.d)+ self.nlist = summary.get("nlist", 4096)+ # Flat indexes have no nprobe — only IVF does. Treat it as 0/no-op+ # there (main's pre-backend code isinstance-checked the same way).+ self._default_nprobe = getattr(self.index, "nprobe", 0)+ self._direct_map_built = False++ @property+ def ntotal(self) -> int:+ return self.index.ntotal++ @property+ def nprobe(self) -> int:+ return getattr(self.index, "nprobe", 0)++ def set_nprobe(self, n):+ if n is not None and hasattr(self.index, "nprobe"):+ self.index.nprobe = n++ def reset_nprobe(self):+ if hasattr(self.index, "nprobe"):+ self.index.nprobe = self._default_nprobe++ def _positions_for(self, article_ids, filter_cache_key):+ """FAISS row positions whose vector belongs to one of article_ids.++ The isin scan is O(ntotal) — cached under filter_cache_key when the+ caller declares the filter stable (e.g. one entry per department).+ """+ if filter_cache_key and filter_cache_key in self._filter_positions:+ return self._filter_positions[filter_cache_key]+ np = self._np+ positions = np.where(np.isin(self._meta["article_ids"], article_ids))[0].astype(+ "int64"+ )+ if filter_cache_key:+ self._filter_positions[filter_cache_key] = positions+ return positions++ def raw_search(+ self,+ query_vectors,+ k,+ min_tile_height=None,+ article_ids=None,+ filter_cache_key=None,+ ):+ # min_tile_height is post-filtered by the API from hit metadata; only+ # the article_ids pre-filter runs inside FAISS (via an IDSelector, so+ # k results are guaranteed when the filtered set has enough vectors).+ if k <= 0:+ return [[] for _ in query_vectors]+ if article_ids is not None:+ faiss = self._faiss+ sel = faiss.IDSelectorBatch(+ self._positions_for(article_ids, filter_cache_key)+ )+ if isinstance(self.index, faiss.IndexIVF):+ params = faiss.SearchParametersIVF(sel=sel, nprobe=self.index.nprobe)+ else:+ params = faiss.SearchParameters(sel=sel)+ distances, indices = self.index.search(query_vectors, k, params=params)+ else:+ distances, indices = self.index.search(query_vectors, k)+ article_ids = self._meta["article_ids"]+ tile_indices = self._meta["tile_indices"]+ chunk_indices = self._meta["chunk_indices"]+ y_offsets = self._meta["y_offsets"]+ tile_heights = self._meta["tile_heights"]+ out = []+ for query_index in range(indices.shape[0]):+ hits = []+ for result_index in range(indices.shape[1]):+ vector_id = int(indices[query_index, result_index])+ if vector_id == -1:+ continue+ hits.append(+ {+ "score": float(distances[query_index, result_index]),+ "vector_id": vector_id,+ "article_id": int(article_ids[vector_id]),+ "tile_index": int(tile_indices[vector_id]),+ "chunk_index": int(chunk_indices[vector_id]),+ "y_offset": int(y_offsets[vector_id]),+ "tile_height": int(tile_heights[vector_id]),+ }+ )+ out.append(hits)+ return out++ def reconstruct(self, vids):+ # IVF indexes need a direct map before reconstruct(); flat indexes+ # support it natively and have no make_direct_map.+ if not self._direct_map_built and hasattr(self.index, "make_direct_map"):+ self.index.make_direct_map()+ self._direct_map_built = True+ return [self.index.reconstruct(int(v)).tolist() for v in vids]+++class QdrantBackend:+ name = "qdrant"+ nlist = 0+ nprobe = 0++ def __init__(+ self, summary, url=None, collection=None, api_key=None, client_config=None+ ):+ from qdrant_client import QdrantClient++ client_options = dict(client_config or {})+ if url:+ client_options["url"] = url+ if api_key:+ client_options["api_key"] = api_key+ if not any(+ key in client_options for key in ("url", "host", "location", "path")+ ):+ raise ValueError(+ "Qdrant requires --qdrant-url or an endpoint in --qdrant-client-config"+ )+ self.collection = collection or summary.get("collection", "pixelrag")+ self.client = QdrantClient(**client_options)+ config = self.client.get_collection(self.collection).config.params.vectors+ self.dimension = config.size++ @property+ def ntotal(self) -> int:+ return self.client.count(self.collection, exact=True).count++ def set_nprobe(self, n):+ pass++ def reset_nprobe(self):+ pass++ @staticmethod+ def _hit(point):+ payload = point.payload+ return {+ "score": float(point.score),+ "vector_id": point.id,+ **{field: int(payload[field]) for field in _META_FIELDS},+ }++ def raw_search(+ self,+ query_vectors,+ k,+ min_tile_height=None,+ article_ids=None,+ filter_cache_key=None,+ ):+ from qdrant_client import models++ if k <= 0:+ return [[] for _ in query_vectors]++ must = []+ if min_tile_height:+ must.append(+ models.FieldCondition(+ key="tile_height",+ range=models.Range(gte=min_tile_height),+ )+ )+ if article_ids is not None:+ # Payload pre-filter on article_id. Fine at local-docs scale+ # (departments of 10^2-10^4 articles); a very large filter set+ # would warrant a dedicated payload field instead.+ must.append(+ models.FieldCondition(+ key="article_id",+ match=models.MatchAny(any=[int(a) for a in article_ids]),+ )+ )+ query_filter = models.Filter(must=must) if must else None+ requests = [+ models.QueryRequest(+ query=v.tolist(),+ limit=k,+ with_payload=True,+ filter=query_filter,+ )+ for v in query_vectors+ ]+ responses = self.client.query_batch_points(self.collection, requests=requests)+ return [+ [self._hit(point) for point in response.points] for response in responses+ ]++ def reconstruct(self, vids):+ points = self.client.retrieve(self.collection, ids=vids, with_vectors=True)+ vectors = {point.id: point.vector for point in points}+ return [vectors.get(vid) for vid in vids]+++def make_backend(args, summary: dict) -> VectorBackend:+ backend = getattr(args, "backend", None) or summary.get("backend", "faiss")++ if backend == "ivf":+ backend = "faiss"+ if backend == "faiss":+ return FaissBackend(args.index_dir, summary)+ if backend == "qdrant":+ return QdrantBackend(+ summary,+ url=getattr(args, "qdrant_url", None),+ collection=getattr(args, "collection", None),+ api_key=getattr(args, "qdrant_api_key", None),+ client_config=getattr(args, "qdrant_client_config", None),+ )+ raise ValueError(f"unknown backend: {backend!r} (expected 'faiss' or 'qdrant')")diff --git a/tests/test_cli.py b/tests/test_cli.pyindex 72fca9f..9b11a63 100644--- a/tests/test_cli.py+++ b/tests/test_cli.py@@ -99,6 +99,15 @@ def test_pixelrag_unknown_stage_errors():assert "unknown" in (r.stdout + r.stderr).lower()+def test_build_index_help_lists_qdrant_collection_modes():+ r = _run("pixelrag", "build-index", "build", "--help")+ assert r.returncode == 0+ assert "--append" in r.stdout+ assert "--recreate" in r.stdout+ assert "--qdrant-client-config" in r.stdout+ assert "--qdrant-quantization-config" in r.stdout++def test_light_imports():# Core install must import without torch.import pixelrag # noqa: F401diff --git a/tests/test_serve_backends.py b/tests/test_serve_backends.pynew file mode 100644index 0000000..9c17c0c--- /dev/null+++ b/tests/test_serve_backends.py@@ -0,0 +1,166 @@+"""VectorBackend contract tests: FAISS and Qdrant must behave identically.++Both backends are exercised against the same tiny synthetic corpus: 12+vectors across 4 articles, two departments. The suite verifies the shared+raw_search contract — hit shape, ranking, the article_ids pre-filter (the+department feature), min_tile_height handling, and reconstruct().++These run only when the heavy optional deps are installed (`[serve]` /+`[qdrant]` extras); CI's core-only install skips them. Qdrant runs fully+in-process via QdrantClient(":memory:") — no server needed.+"""++import json++import numpy as np+import pytest++faiss = pytest.importorskip("faiss", reason="serve extra not installed")++from pixelrag_serve.backends import FaissBackend # noqa: E402++DIM = 8+N_VECTORS = 12+# vector i belongs to article i // 3 (articles 0..3); departments: 0,1 -> "eng", 2,3 -> "hr"+ARTICLE_OF = [i // 3 for i in range(N_VECTORS)]+ENG_ARTICLES = np.asarray([0, 1])+HR_ARTICLES = np.asarray([2, 3])+++def _unit(v):+ return v / np.linalg.norm(v)+++def _make_vectors():+ rng = np.random.default_rng(42)+ return np.stack([_unit(rng.normal(size=DIM)) for _ in range(N_VECTORS)]).astype(+ "float32"+ )+++VECTORS = _make_vectors()++[email protected](scope="module")+def faiss_backend(tmp_path_factory):+ index_dir = tmp_path_factory.mktemp("faiss_index")+ index = faiss.IndexFlatIP(DIM)+ index.add(VECTORS)+ faiss.write_index(index, str(index_dir / "index.faiss"))+ np.savez(+ index_dir / "metadata.npz",+ article_ids=np.asarray(ARTICLE_OF),+ tile_indices=np.zeros(N_VECTORS, dtype=np.int64),+ chunk_indices=np.arange(N_VECTORS) % 3,+ y_offsets=np.zeros(N_VECTORS, dtype=np.int64),+ tile_heights=np.full(N_VECTORS, 100 + 10 * np.arange(N_VECTORS) % 200),+ )+ (index_dir / "summary.json").write_text(json.dumps({"backend": "faiss"}))+ return FaissBackend(str(index_dir), {"dimension": DIM})++[email protected](scope="module")+def qdrant_backend():+ pytest.importorskip("qdrant_client", reason="qdrant extra not installed")+ from qdrant_client import QdrantClient, models++ from pixelrag_serve.backends import QdrantBackend++ client = QdrantClient(":memory:")+ client.create_collection(+ "pixelrag",+ vectors_config=models.VectorParams(size=DIM, distance=models.Distance.DOT),+ )+ client.upsert(+ "pixelrag",+ points=[+ models.PointStruct(+ id=i,+ vector=VECTORS[i].tolist(),+ payload={+ "article_id": ARTICLE_OF[i],+ "tile_index": 0,+ "chunk_index": i % 3,+ "y_offset": 0,+ "tile_height": int(100 + 10 * i % 200),+ },+ )+ for i in range(N_VECTORS)+ ],+ )+ backend = QdrantBackend.__new__(QdrantBackend)+ backend.collection = "pixelrag"+ backend.client = client+ backend.dimension = DIM+ return backend+++def _backends(request):+ return request.getfixturevalue(request.param)++[email protected](params=["faiss_backend", "qdrant_backend"])+def backend(request):+ return _backends(request)+++def test_raw_search_hit_shape_and_ranking(backend):+ query = VECTORS[4:5] # exact vector -> must be its own top hit+ (hits,) = backend.raw_search(query, 3)+ assert len(hits) == 3+ top = hits[0]+ assert int(top["vector_id"]) == 4+ assert top["article_id"] == ARTICLE_OF[4]+ assert set(top) >= {+ "score",+ "vector_id",+ "article_id",+ "tile_index",+ "chunk_index",+ "y_offset",+ "tile_height",+ }+ assert hits[0]["score"] >= hits[1]["score"] >= hits[2]["score"]+++def test_article_ids_prefilter_restricts_results(backend):+ # Query WITH an eng vector but filter to hr articles: every hit must be hr.+ query = VECTORS[0:1]+ (hits,) = backend.raw_search(query, 6, article_ids=HR_ARTICLES)+ assert hits, "filtered search must still return results"+ assert all(h["article_id"] in (2, 3) for h in hits)+ # And the unfiltered search does find the eng vector first (sanity).+ (unfiltered,) = backend.raw_search(query, 3)+ assert int(unfiltered[0]["vector_id"]) == 0+++def test_prefilter_guarantees_k_within_department(backend):+ # hr has 6 vectors; asking for 6 filtered hits must return all 6 —+ # the point of pre-filtering over post-filtering.+ (hits,) = backend.raw_search(VECTORS[6:7], 6, article_ids=HR_ARTICLES)+ assert len(hits) == 6+ assert sorted(int(h["vector_id"]) for h in hits) == [6, 7, 8, 9, 10, 11]+++def test_filter_cache_key_reuses_positions(faiss_backend):+ (first,) = faiss_backend.raw_search(+ VECTORS[0:1], 3, article_ids=ENG_ARTICLES, filter_cache_key="dept:eng"+ )+ assert "dept:eng" in faiss_backend._filter_positions+ cached = faiss_backend._filter_positions["dept:eng"]+ (second,) = faiss_backend.raw_search(+ VECTORS[0:1], 3, article_ids=ENG_ARTICLES, filter_cache_key="dept:eng"+ )+ assert faiss_backend._filter_positions["dept:eng"] is cached+ assert [h["vector_id"] for h in first] == [h["vector_id"] for h in second]+++def test_reconstruct_round_trips(backend):+ vecs = backend.reconstruct([1, 5])+ assert len(vecs) == 2+ np.testing.assert_allclose(np.asarray(vecs[0]), VECTORS[1], atol=1e-6)+ np.testing.assert_allclose(np.asarray(vecs[1]), VECTORS[5], atol=1e-6)+++def test_k_zero_returns_empty(backend):+ assert backend.raw_search(VECTORS[0:1], 0) == [[]]diff --git a/uv.lock b/uv.lockindex ffd0176..97cd70e 100644--- a/uv.lock+++ b/uv.lock@@ -3,11 +3,14 @@ revision = 3requires-python = ">=3.12"resolution-markers = ["python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux'",- "python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux'",+ "python_full_version == '3.13.*' and platform_machine != 'aarch64' and sys_platform == 'linux'",+ "python_full_version < '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux'","python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",- "python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version == '3.13.*' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version < '3.13' and platform_machine == 'aarch64' and sys_platform == 'linux'","python_full_version >= '3.14' and sys_platform == 'darwin'",- "python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version == '3.13.*' and sys_platform == 'darwin'",+ "python_full_version < '3.13' and sys_platform == 'darwin'",]supported-markers = ["sys_platform == 'linux'",@@ -585,6 +588,41 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/6d/89/6c2fb63df3596552d20e58fb4d96669243388cf680cff222758812c7bfaa/greenlet-3.5.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:4a448128607be0de65342dc9b31be7f948ef4cc0bc8832069350abefd310a8f2", size = 1675480, upload-time = "2026-04-27T12:25:34.168Z" },]+[[package]]+name = "grpcio"+version = "1.82.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/90/bc/656b89387d6f4ed7e0686c7b64c2ae7e554a759aa58122c8e5fb99392c32/grpcio-1.82.1.tar.gz", hash = "sha256:707b24abd90fcb1e45bcc080577da1dbf9971d107490589b9539af8e1e77b4b5", size = 13187300, upload-time = "2026-07-08T12:36:16.588Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/dc/88/d1350bf3343a2ed87d801584e40609f6c6bd3087926eeca03de50348cf4a/grpcio-1.82.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:c09bd5fa0d5b1fbd773ec349fe61441c3e4ebf168c229aa7538a820bdfad6a58", size = 6144689, upload-time = "2026-07-08T12:34:55.567Z" },+ { url = "https://files.pythonhosted.org/packages/e6/33/71875cdecd27c24ac1385d4783a09853f01b84a825a36aec2a2bc7d0d080/grpcio-1.82.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:1eae24810720734598e3e6a1a528d5de0f265fe3fc86575e9ecce424b9ec7379", size = 11952034, upload-time = "2026-07-08T12:34:58.128Z" },+ { url = "https://files.pythonhosted.org/packages/82/b2/d9125df3d8a140dec12cc82c05b7deafedeababcff6496f28b2fd5634d10/grpcio-1.82.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a6bd5daf5bde7b24d7ad2cbaf8bf9eac620d96222016bb5e7ddde930dec0673f", size = 6710772, upload-time = "2026-07-08T12:35:01.33Z" },+ { url = "https://files.pythonhosted.org/packages/88/9b/69e2d1627398b964f34437dc476a5aff5a2cc8e7f247d26272b5674b5faf/grpcio-1.82.1-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:1ecfde669cb687ac020d31ff76debe5dc7a62213335f02262eb6625628da1c03", size = 7450677, upload-time = "2026-07-08T12:35:03.926Z" },+ { url = "https://files.pythonhosted.org/packages/e4/e7/8f855ca29c294956122a2a73023655b9b02602d5111dad2b9b00e7631c68/grpcio-1.82.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:011c8badee95734dee8bf05ce3464756a0ac3ebb8d443afd20c0e2b5e4640ad9", size = 6886855, upload-time = "2026-07-08T12:35:06.174Z" },+ { url = "https://files.pythonhosted.org/packages/5f/f0/fa87e85f49925f44c479d07e58b051e69bcfef6b6d5fbc6749d140f6730a/grpcio-1.82.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b85f4564926fb23114d239392bdcae200db1e6179629edd7d7ab0ab89c96a197", size = 7501323, upload-time = "2026-07-08T12:35:08.49Z" },+ { url = "https://files.pythonhosted.org/packages/67/55/2e0b10ae1d3ef9dcc480b91dc2158f4931fc4675d3af0a2836e39b2a744f/grpcio-1.82.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:2c0c8270833395644c3fe6b6a806397955a2bc0538000a19a78b90c05a6c16e0", size = 8536899, upload-time = "2026-07-08T12:35:10.975Z" },+ { url = "https://files.pythonhosted.org/packages/bd/95/a3d8b0431fa221efc51ee39d73595ede74ba82a43b7c4313192e580face2/grpcio-1.82.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2ba199205ff46c7778290fe1673c91ac8e7e45678dd5c86e9e56fa33ec8788f6", size = 7913892, upload-time = "2026-07-08T12:35:13.944Z" },+ { url = "https://files.pythonhosted.org/packages/1b/3e/496992d08c0aaa11272eb6228dc8ab947da01fe835de243cd00521bce4c4/grpcio-1.82.1-cp313-cp313-linux_armv7l.whl", hash = "sha256:b454a2d97bfab7565683a02345f86bd182ab69fd7c2bdb7414171e7538f266b1", size = 6146068, upload-time = "2026-07-08T12:35:21.365Z" },+ { url = "https://files.pythonhosted.org/packages/e7/8f/f263d6f14fdba6b56cfadd91fd3e158a52682b72c6016d1f8723d435659f/grpcio-1.82.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:3dde70abfc80b3be11de53ba0d601c439e7fb2afd3583ad1788d1146bec92fdc", size = 11948600, upload-time = "2026-07-08T12:35:24.312Z" },+ { url = "https://files.pythonhosted.org/packages/8c/14/3a02e6ee49c2d85bc15eaae321e0e11ab3542cad3c5b2de121ecce0c4296/grpcio-1.82.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f5523099c98c292ea1ae08e617249db760c56a78f8deae879027fe7d1ffbcbf6", size = 6714591, upload-time = "2026-07-08T12:35:27.027Z" },+ { url = "https://files.pythonhosted.org/packages/69/80/58e3738696f48ab7645347b98d8a7f93d10e00e6218388fbfcd6c9310e3d/grpcio-1.82.1-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:5e5c4dc0a59b0f8490a6bdfd6fc8395b9d8ad8a8407c7d67ca7b5bba15c0877f", size = 7454995, upload-time = "2026-07-08T12:35:29.599Z" },+ { url = "https://files.pythonhosted.org/packages/f3/6c/2557c1a889363072fbf2285ecd0e8c44860d4dbd60f017a32537c5b863e2/grpcio-1.82.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c40d94ba820329cc191981bc22fa6f6eed0799c6d921f3c6709521d59d4a2fd7", size = 6888621, upload-time = "2026-07-08T12:35:32.38Z" },+ { url = "https://files.pythonhosted.org/packages/d2/66/907706ccaff1223f1e10fd5b37fc16faead43392fccb4e786e7e390ac141/grpcio-1.82.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4c816180e31e273caaec6f8bd86a8392499d5bbb26f41da44e3dce48bde69095", size = 7505069, upload-time = "2026-07-08T12:35:35.072Z" },+ { url = "https://files.pythonhosted.org/packages/b3/7c/ff97b0d0f635987ee5ec80dfedafa1aad629303745d48e8637d10eec5b80/grpcio-1.82.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:e31fd780b261830720cb70b0fd8f0aa51d49e75a66d7464ad2e31d4b765f2580", size = 8535384, upload-time = "2026-07-08T12:35:37.954Z" },+ { url = "https://files.pythonhosted.org/packages/62/9e/a97fddd970a8d1588cade06eca20443761c1858b0ad6590a5c835aa18062/grpcio-1.82.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9d76152d7c31d7210d4a106e5d8b64da5bba5d6abf11be30e2f7b0a0c59bbcbf", size = 7910707, upload-time = "2026-07-08T12:35:40.797Z" },+ { url = "https://files.pythonhosted.org/packages/b4/cb/cf9ae9e164c6e6dc8a494faa9771763df9da150eefe19671009624d1559f/grpcio-1.82.1-cp314-cp314-linux_armv7l.whl", hash = "sha256:35f990f7784c8fd2872644f07f96ebb4d9e48e145a190ab80d0280af91a1bfb2", size = 6146901, upload-time = "2026-07-08T12:35:49.261Z" },+ { url = "https://files.pythonhosted.org/packages/3b/2a/eccf26dbcfb7f7cab8027c5490a16c8937c5aa7a2ec20a3eab2cf7a43165/grpcio-1.82.1-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:46536a4a1f4434df3c851b9254ff6fc7df5705b273681a15ca277d5921c178a0", size = 11954756, upload-time = "2026-07-08T12:35:52.196Z" },+ { url = "https://files.pythonhosted.org/packages/ad/75/3b3b4a3cc9f084b026af96e1d3e539b1af29ec7f41ed0dfff3cb99cc8626/grpcio-1.82.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d6650a7c1ebb7921c70e12a385439a8118efb99e669fa9ed31cf25db1843937c", size = 6723087, upload-time = "2026-07-08T12:35:54.973Z" },+ { url = "https://files.pythonhosted.org/packages/9c/8b/b0f0c9b1400a99a4da4c09b114f101b192f8f11192e76f620b8962f5d90b/grpcio-1.82.1-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:b8e110c66df5204c0506d6c8787b35d48b8b699ef5aa366d6c4d67325c67fe9a", size = 7454542, upload-time = "2026-07-08T12:35:57.586Z" },+ { url = "https://files.pythonhosted.org/packages/b7/bd/428e38868382aa193697a5aa53973f29c58e58ba4268aa0c86a2715ee58b/grpcio-1.82.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f853eae07235a51a27bb5d6a9a175a59ca55dc9b99edc6ce2f76f07332d333ae", size = 6889588, upload-time = "2026-07-08T12:36:00.012Z" },+ { url = "https://files.pythonhosted.org/packages/49/ce/03e01d5e10259bf5c08ee50570cc94724e79c956f61fd2f09b341af0956c/grpcio-1.82.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:60b0f2c95337694fc094b77d9f60f50566c84b5677393e342eb98daeee242d98", size = 7514166, upload-time = "2026-07-08T12:36:02.693Z" },+ { url = "https://files.pythonhosted.org/packages/ff/59/278b4b600329e2ba3849f3c1ea3c820b3a01b38a7ad184ba09595e8d2733/grpcio-1.82.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:b064fc444812bdaa9825d33c26f8d732d63ee6a5d78557c1faf92c98687fed27", size = 8536166, upload-time = "2026-07-08T12:36:05.349Z" },+ { url = "https://files.pythonhosted.org/packages/44/27/7ccf2ef00f27a8e47a79d641c8ceaf7d3028c7a03d9a97b4c8a9a783c086/grpcio-1.82.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:7d7ede11d747b4e1bd05e3bc0260e155b65a88735a895a10f6521f19b889511e", size = 7912572, upload-time = "2026-07-08T12:36:08.393Z" },+]+[[package]]name = "h11"version = "0.16.0"@@ -594,6 +632,19 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" },]+[[package]]+name = "h2"+version = "4.3.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "hpack", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+ { name = "hyperframe", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/1d/17/afa56379f94ad0fe8defd37d6eb3f89a25404ffc71d4d848893d270325fc/h2-4.3.0.tar.gz", hash = "sha256:6c59efe4323fa18b47a632221a1888bd7fde6249819beda254aeca909f221bf1", size = 2152026, upload-time = "2025-08-23T18:12:19.778Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/69/b2/119f6e6dcbd96f9069ce9a2665e0146588dc9f88f29549711853645e736a/h2-4.3.0-py3-none-any.whl", hash = "sha256:c438f029a25f7945c69e0ccf0fb951dc3f73a5f6412981daee861431b70e2bdd", size = 61779, upload-time = "2025-08-23T18:12:17.779Z" },+]+[[package]]name = "hf-xet"version = "1.5.0"@@ -620,6 +671,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/aa/b2/703569fc881f3284487e68cda7b42179978480da3c438042a6bbbb4a671c/hf_xet-1.5.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4b35549ce62601b84da4ff9b24d970032ace3d4430f52d91bcbb26c901d6c690", size = 4672414, upload-time = "2026-05-06T06:18:09.864Z" },]+[[package]]+name = "hpack"+version = "4.2.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/26/5b/fcabf6028144a8723726318b07a32c2f3314acdff6265743cf08a344b18e/hpack-4.2.0.tar.gz", hash = "sha256:0895cfa3b5531fc65fe439c05eb65144f123bf7a394fcaa56aa423548d8e45c0", size = 51300, upload-time = "2026-06-23T18:34:46.667Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/71/b4/4a9fcfb2aef6ba44d9073ecd301443aa00b3dac95de5619f2a7de7ec8a91/hpack-4.2.0-py3-none-any.whl", hash = "sha256:858ac0b02280fa582b5080d68db0899c62a80375e0e5413a74970c5e518b6986", size = 34246, upload-time = "2026-06-23T18:34:45.472Z" },+]+[[package]]name = "htmldate"version = "1.9.4"@@ -664,6 +724,11 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" },]+[package.optional-dependencies]+http2 = [+ { name = "h2", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+]+[[package]]name = "huggingface-hub"version = "0.36.2"@@ -683,6 +748,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/a8/af/48ac8483240de756d2438c380746e7130d1c6f75802ef22f3c6d49982787/huggingface_hub-0.36.2-py3-none-any.whl", hash = "sha256:48f0c8eac16145dfce371e9d2d7772854a4f591bcb56c9cf548accf531d54270", size = 566395, upload-time = "2026-02-06T09:24:11.133Z" },]+[[package]]+name = "hyperframe"+version = "6.1.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/02/e7/94f8232d4a74cc99514c13a9f995811485a6903d48e5d952771ef6322e30/hyperframe-6.1.0.tar.gz", hash = "sha256:f630908a00854a7adeabd6382b43923a4c4cd4b821fcb527e6ab9e15382a3b08", size = 26566, upload-time = "2025-01-22T21:41:49.302Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/48/30/47d0bf6072f7252e6521f3447ccfa40b421b6824517f82854703d0f5a98b/hyperframe-6.1.0-py3-none-any.whl", hash = "sha256:b03380493a519fce58ea5af42e4a42317bf9bd425596f7a0835ffce80f1a42e5", size = 13007, upload-time = "2025-01-22T21:41:47.295Z" },+]+[[package]]name = "idna"version = "3.15"@@ -1438,6 +1512,7 @@ all = [{ name = "fastapi", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },{ name = "markdown", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },{ name = "pydantic", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+ { name = "qdrant-client", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },{ name = "qwen-vl-utils", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },{ name = "torch", version = "2.9.1+cu129", source = { registry = "https://download.pytorch.org/whl/cu129" }, marker = "sys_platform == 'linux'" },{ name = "torch", version = "2.12.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'darwin'" },@@ -1493,6 +1568,9 @@ pdf = [playwright = [{ name = "playwright", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },]+qdrant = [+ { name = "qdrant-client", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+]serve = [{ name = "faiss-cpu", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },{ name = "fastapi", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },@@ -1528,13 +1606,14 @@ requires-dist = [{ name = "pillow", specifier = ">=10.0.0" },{ name = "pillow", marker = "extra == 'eval'", specifier = ">=10.0" },{ name = "pixelrag", extras = ["embed"], marker = "extra == 'index'" },- { name = "pixelrag", extras = ["embed", "serve", "index"], marker = "extra == 'all'" },+ { name = "pixelrag", extras = ["embed", "serve", "index", "qdrant"], marker = "extra == 'all'" },{ name = "playwright", marker = "extra == 'playwright'", specifier = ">=1.40.0" },{ name = "pydantic", marker = "extra == 'serve'", specifier = ">=2.0.0" },{ name = "pymupdf", specifier = ">=1.27.2.3" },{ name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0" },{ name = "pyturbojpeg", specifier = ">=2.2.0" },{ name = "pyyaml", specifier = ">=6.0" },+ { name = "qdrant-client", marker = "extra == 'qdrant'", specifier = ">=1.18.0" },{ name = "qwen-vl-utils", marker = "extra == 'serve'" },{ name = "torch", marker = "sys_platform == 'linux' and extra == 'embed'", specifier = ">=2.9.0", index = "https://download.pytorch.org/whl/cu129" },{ name = "torch", marker = "sys_platform == 'linux' and extra == 'serve'", specifier = ">=2.9.0", index = "https://download.pytorch.org/whl/cu129" },@@ -1551,7 +1630,7 @@ requires-dist = [{ name = "uvicorn", marker = "extra == 'serve'", specifier = ">=0.30.0" },{ name = "websockets", specifier = ">=12.0" },]-provides-extras = ["embed", "serve", "index", "all", "gpu", "playwright", "pdf", "kiwix", "distributed", "eval", "dev"]+provides-extras = ["embed", "serve", "index", "qdrant", "all", "gpu", "playwright", "pdf", "kiwix", "distributed", "eval", "dev"][[package]]name = "playwright"@@ -1578,6 +1657,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },]+[[package]]+name = "portalocker"+version = "3.2.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/5e/77/65b857a69ed876e1951e88aaba60f5ce6120c33703f7cb61a3c894b8c1b6/portalocker-3.2.0.tar.gz", hash = "sha256:1f3002956a54a8c3730586c5c77bf18fae4149e07eaf1c29fc3faf4d5a3f89ac", size = 95644, upload-time = "2025-06-14T13:20:40.03Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/4b/a6/38c8e2f318bf67d338f4d629e93b0b4b9af331f455f0390ea8ce4a099b26/portalocker-3.2.0-py3-none-any.whl", hash = "sha256:3cdc5f565312224bc570c49337bd21428bba0ef363bbcf58b9ef4a9f11779968", size = 22424, upload-time = "2025-06-14T13:20:38.083Z" },+]+[[package]]name = "propcache"version = "0.5.2"@@ -1657,6 +1745,19 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/3a/ed/1cdcab6ba3d6ab7feca11fc14f0eeea80755bb53ef4e892079f31b10a25f/propcache-0.5.2-py3-none-any.whl", hash = "sha256:be1ddfcbb376e3de5d2e2db1d58d6d67463e6b4f9f040c000de8e300295465fe", size = 14036, upload-time = "2026-05-08T21:02:10.673Z" },]+[[package]]+name = "protobuf"+version = "7.35.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/da/01/9ef0afd7999eb9badb3a768b4aedd78c86d4c65cfaf1958ab276199e76b4/protobuf-7.35.1.tar.gz", hash = "sha256:ce115a26fe0c39a2c29973d914d327e516a6455464489fe3cd1e51a1b354f81a", size = 458717, upload-time = "2026-06-11T21:55:40.257Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/10/03/8aeeb7458d22546bf64b5250ca1daeb5ff757d900e8e4a7476c6f0db843e/protobuf-7.35.1-cp310-abi3-macosx_10_9_universal2.whl", hash = "sha256:24f857477359a85c0c235261b8ba905fd51b2562f4a64ca1df5473f29850cbf6", size = 433226, upload-time = "2026-06-11T21:55:31.719Z" },+ { url = "https://files.pythonhosted.org/packages/37/4b/dfb89eb0e652a1ff073c39a59fb5e3a83cfe9b57a2c83fa6d78270101767/protobuf-7.35.1-cp310-abi3-manylinux2014_aarch64.whl", hash = "sha256:11d6b0ec246892d85215b0a13ca6e0233cf5284b68f0ac02646427f4ff88a799", size = 328847, upload-time = "2026-06-11T21:55:34.035Z" },+ { url = "https://files.pythonhosted.org/packages/0f/58/dc12f2cd484951524af6e3382c785869b9b3fb5e52ee95ae23add53ee8f9/protobuf-7.35.1-cp310-abi3-manylinux2014_s390x.whl", hash = "sha256:b73f9489a4b8b1c9cb1f8ed951c736392592edb24b9d6819f36d2e10b171d5b4", size = 344030, upload-time = "2026-06-11T21:55:34.941Z" },+ { url = "https://files.pythonhosted.org/packages/e4/be/5b3cfe508bfab6761414ff944e3366eb13be4fd71efcd69450f89ba39f43/protobuf-7.35.1-cp310-abi3-manylinux2014_x86_64.whl", hash = "sha256:74758715c53d7158fb76caf4f0cfdacc5329a4b1bb994f865d6cf302d413a1c4", size = 327130, upload-time = "2026-06-11T21:55:35.921Z" },+ { url = "https://files.pythonhosted.org/packages/19/c7/5f7c636ec43e0c545e28d1f1db71990108306f7bdcb89f069ba97e428e7f/protobuf-7.35.1-py3-none-any.whl", hash = "sha256:4bc97768d8fe4ad6743c8a19403e314511ed9f6d13205b687e52421c023ac1b9", size = 171659, upload-time = "2026-06-11T21:55:39.155Z" },+]+[[package]]name = "pyarrow"version = "24.0.0"@@ -1889,6 +1990,24 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" },]+[[package]]+name = "qdrant-client"+version = "1.18.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "grpcio", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+ { name = "httpx", extra = ["http2"], marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+ { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+ { name = "portalocker", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+ { name = "protobuf", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+ { name = "pydantic", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+ { name = "urllib3", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/65/45/5b1bdd15a3c7730eefb9c113600829e20d689b82b5a23f9e07d107094004/qdrant_client-1.18.0.tar.gz", hash = "sha256:52e8ece1a7d40519801bf0b70713bfa0f6b7ae28c7275bbe0b0286fbed7f6db4", size = 352580, upload-time = "2026-05-11T14:12:38.702Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/d6/10/c437bd2ac41ef30d3019063e6ce537dc111e9214473b337ee88f7fa6359a/qdrant_client-1.18.0-py3-none-any.whl", hash = "sha256:093aa8cf8a420ee3ad2a68b007e1378d7992b2600e0b53c193fc172674f659cd", size = 398126, upload-time = "2026-05-11T14:12:36.998Z" },+]+[[package]]name = "qwen-vl-utils"version = "0.0.14"@@ -2030,7 +2149,8 @@ version = "81.0.0"source = { registry = "https://pypi.org/simple" }resolution-markers = ["python_full_version >= '3.14' and sys_platform == 'darwin'",- "python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version == '3.13.*' and sys_platform == 'darwin'",+ "python_full_version < '3.13' and sys_platform == 'darwin'",]sdist = { url = "https://files.pythonhosted.org/packages/0d/1c/73e719955c59b8e424d015ab450f51c0af856ae46ea2da83eba51cc88de1/setuptools-81.0.0.tar.gz", hash = "sha256:487b53915f52501f0a79ccfd0c02c165ffe06631443a886740b91af4b7a5845a", size = 1198299, upload-time = "2026-02-06T21:10:39.601Z" }wheels = [@@ -2043,9 +2163,11 @@ version = "82.0.1"source = { registry = "https://pypi.org/simple" }resolution-markers = ["python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux'",- "python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux'",+ "python_full_version == '3.13.*' and platform_machine != 'aarch64' and sys_platform == 'linux'",+ "python_full_version < '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux'","python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",- "python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version == '3.13.*' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version < '3.13' and platform_machine == 'aarch64' and sys_platform == 'linux'",]sdist = { url = "https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz", hash = "sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9", size = 1152316, upload-time = "2026-03-09T12:47:17.221Z" }wheels = [@@ -2133,9 +2255,11 @@ version = "2.9.1+cu129"source = { registry = "https://download.pytorch.org/whl/cu129" }resolution-markers = ["python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux'",- "python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux'",+ "python_full_version == '3.13.*' and platform_machine != 'aarch64' and sys_platform == 'linux'",+ "python_full_version < '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux'","python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",- "python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version == '3.13.*' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version < '3.13' and platform_machine == 'aarch64' and sys_platform == 'linux'",]dependencies = [{ name = "filelock", marker = "sys_platform == 'linux'" },@@ -2181,7 +2305,8 @@ version = "2.12.1"source = { registry = "https://pypi.org/simple" }resolution-markers = ["python_full_version >= '3.14' and sys_platform == 'darwin'",- "python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version == '3.13.*' and sys_platform == 'darwin'",+ "python_full_version < '3.13' and sys_platform == 'darwin'",]dependencies = [{ name = "filelock", marker = "sys_platform == 'darwin'" },@@ -2205,7 +2330,8 @@ version = "0.24.1"source = { registry = "https://download.pytorch.org/whl/cu129" }resolution-markers = ["python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",- "python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version == '3.13.*' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version < '3.13' and platform_machine == 'aarch64' and sys_platform == 'linux'",]dependencies = [{ name = "numpy", marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" },@@ -2226,7 +2352,8 @@ version = "0.24.1+cu129"source = { registry = "https://download.pytorch.org/whl/cu129" }resolution-markers = ["python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux'",- "python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux'",+ "python_full_version == '3.13.*' and platform_machine != 'aarch64' and sys_platform == 'linux'",+ "python_full_version < '3.13' and platform_machine != 'aarch64' and sys_platform == 'linux'",]dependencies = [{ name = "numpy", marker = "platform_machine != 'aarch64' and sys_platform == 'linux'" },@@ -2247,7 +2374,8 @@ version = "0.27.1"source = { registry = "https://pypi.org/simple" }resolution-markers = ["python_full_version >= '3.14' and sys_platform == 'darwin'",- "python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version == '3.13.*' and sys_platform == 'darwin'",+ "python_full_version < '3.13' and sys_platform == 'darwin'",]dependencies = [{ name = "numpy", marker = "sys_platform == 'darwin'" },