You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched the LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
I am sure that this is a bug in LangChain rather than my code.
The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
defretriever_tool():
""" Consult the company policies to check whether certain options are permitted. """vectorstore=Chroma(
embedding_function=AzureOpenAIEmbeddings(deployment=os.environ["EMBEDDING_DEPLOYMENT_NAME"], chunk_size=1),
collection_name="local-rag",
persist_directory=os.environ["DATA_STORAGE"],
client_settings=Settings(anonymized_telemetry=False, is_persistent=True),
)
retriever=vectorstore.as_retriever(search_type="similarity", search_kwargs={"k": 3})
returncreate_retriever_tool(
retriever,
"docs_retriever",
"Get information about pcfc roles and responsibilities policy and regulations",
)
Error Message and Stack Trace (if applicable)
No response
Description
The current version of langchain-chroma (0.2.2) specifies a dependency on numpy>=1.26.2,<2.0.0. This constraint conflicts with other packages that require numpy>=2.0.0 or higher, causing version resolution failures in projects that depend on both. For example, a project using langchain-chroma (>=0.2.2,<0.3.0) alongside another package needing a newer numpy version cannot resolve dependencies. Could the upper bound on numpy be relaxed to >=2.0.2 in a future release to improve compatibility?
System Info
System Information
OS: Darwin
OS Version: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000
Python Version: 3.12.9 (main, Feb 4 2025, 14:38:38) [Clang 16.0.0 (clang-1600.0.26.6)]
Could langchain-chroma be updated in a future release to support numpy>=2.0.2, given the current restriction to <2.0.0 causes conflicts with packages needing newer numpy versions?
#30714)
Generally, this PR is CI performance focused + aims to clean up some
dependencies at the same time.
1. Unpins upper bounds for `numpy` in all `pyproject.toml` files where
`numpy` is specified
2. Requires `numpy >= 2.1.0` for Python 3.13 and `numpy > v1.26.0` for
Python 3.12, plus a `numpy` min version bump for `chroma`
3. Speeds up CI by minutes - linting on Python 3.13, installing `numpy <
2.1.0` was taking [~3
minutes](https://github.com/langchain-ai/langchain/actions/runs/14316342925/job/40123305868?pr=30713),
now the entire env setup takes a few seconds
4. Deleted the `numpy` test dependency from partners where that was not
used, specifically `huggingface`, `voyageai`, `xai`, and `nomic`.
It's a bit unfortunate that `langchain-community` depends on `numpy`, we
might want to try to fix that in the future...
Closes#26026Fixes#30555
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
No response
Description
The current version of langchain-chroma (0.2.2) specifies a dependency on numpy>=1.26.2,<2.0.0. This constraint conflicts with other packages that require numpy>=2.0.0 or higher, causing version resolution failures in projects that depend on both. For example, a project using langchain-chroma (>=0.2.2,<0.3.0) alongside another package needing a newer numpy version cannot resolve dependencies. Could the upper bound on numpy be relaxed to >=2.0.2 in a future release to improve compatibility?
System Info
System Information
Package Information
Optional packages not installed
The text was updated successfully, but these errors were encountered: