From 36c24be35d5636519c6052e1443c76f7b2ea7c93 Mon Sep 17 00:00:00 2001 From: MemOS AutoDev Date: Tue, 30 Jun 2026 00:48:51 +0800 Subject: [PATCH] fix: raise scipy floor to ^1.13.0 for numpy 2.x / chonkie 1.6 compatibility The [tool.poetry.group.eval] block declared `scipy = "^1.10.1"`, but scipy 1.10.x pins `numpy<1.27.0` while chonkie>=1.6 requires `numpy>=2.0.0`. The two constraints cannot be jointly satisfied, so users hitting both packages saw the `ImportError: numpy.core.multiarray failed to import` reported in #1342. scipy 1.13.0 is the first release that supports numpy 2.x, so this commit: - Bumps the eval-group scipy floor `^1.10.1` -> `^1.13.0`. - Adds an explanatory comment near the chonkie entry in `mem-reader` extras so future readers see the numpy 2.x implication. scipy is only imported by `evaluation/scripts/{longmemeval,locomo}_eval.py`; no `src/memos/` code path is affected. The committed `poetry.lock` already resolves scipy to 1.15.3 / 1.16.0 (numpy 2.2.6 / 2.3.1), all of which satisfy the new floor, so no re-lock is needed. Fixes #1342 --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5d65422d3..c61775f4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,6 +89,8 @@ mem-user = [ # MemReader mem-reader = [ + # chonkie>=1.6 pulls numpy>=2.0; any environment that also has scipy + # installed must use scipy>=1.13 (older scipy pins numpy<1.27). See #1342. "chonkie (>=1.0.7,<2.0.0)", # Sentence chunking library "markitdown[docx,pdf,pptx,xls,xlsx] (>=0.1.1,<0.2.0)", # Markdown parser for various file formats "langchain-text-splitters (>=1.0.0,<2.0.0)", # markdown chunk for langchain @@ -193,7 +195,9 @@ zep-cloud = "^2.15.0" rouge-score = "^0.1.2" nltk = "^3.9.1" bert-score = "^0.3.13" -scipy = "^1.10.1" +# scipy 1.13+ supports numpy 2.x. Older scipy (1.10/1.11/1.12) pins numpy<1.27 +# which collides with chonkie>=1.6 (requires numpy>=2.0.0) — see issue #1342. +scipy = "^1.13.0" python-dotenv = "^1.1.1" langgraph = "^0.5.1"