-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Missing of trust_remote_code
in SentenceTransformerEmbeddingFunction class, which produces an error during loading of other repo models
#2685
Comments
@Darrshan-Sankar, thanks for reporting this. Indeed, newer versions of Chroma address many bugs or deficiencies of older versions. Let me know what hurdles you have to overcome to upgrade to the latest Chroma version. I'd be happy to assist further. |
Even if I perform a general install, since few langchain based requirements were coded for older package versions, I am getting the older version of chromadb installed. Is it ok if I open a PR for the branch |
@Darrshan-Sankar, I see your conundrum. The easiest way to move forward without doing the upgrade would be to just pickup the EF from latest main https://github.com/chroma-core/chroma/blob/main/chromadb/utils/embedding_functions/sentence_transformer_embedding_function.py. And adjust it so that it works with the older EmbeddingFunction protocol: class EmbeddingFunction(Protocol):
def __call__(self, texts: Documents) -> Embeddings:
... |
@tazarov Thank you for being in touch and I will try and let all know |
@tazarov Good day. Its @Darrshan-Sankar here. For this issue, I have forked the particular branch and created a I verified the same by installing from my updated repository: pip install git+https://github.com/Darrshan-Sankar/[email protected]
|
@Darrshan-Sankar, thanks for PR #2694, but I think the chances of it getting merged + a new release in the 0.3.x range is unlikely. I see two paths forward:
|
@tazarov Thanks to your continuous support. Being new to contributing, I couldn't understand the complete message in the mentioned issue. Help or directions would be appreciated regarding the contrib package. Thank you |
hey @Darrshan-Sankar, contributing to open source is awesome! By linking the issue, I mean that there's this high-level idea of a contrib package that enhances Chroma by providing auxiliary functionality. The shape or form of such a contrib package is not yet formalized, so for now, so this doesn't block you, I would suggest that you include the modified embedding function as part of your project and use it as such until it can be contributed meaningfully. |
Thank you @tazarov . Please notify is such integrations are done by referencing this issue. Thanks |
With this fix, I close this issue |
What happened?
I tried to load an embedding model and create an embedding function using the
SentenceTransformerEmbeddingFunction
, which I imported using the code:I used the same to load a model, which was from a different repository rather than
sentence-transformers
one. When I tried to perform the same, I got the following error:I know the solution and wish to pull and merge.
Versions
chromadb v0.3.29, Python v3.11.4
Relevant log output
No response
##NOTE: I wish to commit to the particular branch that corresponds to this version(chromadb==0.3.29) as i have this version as a dependency being used.
I found that this issue was fixed in the following release:
Release: 0.5.0
https://github.com/chroma-core/chroma/releases/tag/0.5.0I wish to perform the same update on release for version 0.3.29(as it is part of my dependency). Is that valid and can be done?
The text was updated successfully, but these errors were encountered: