Skip to content
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

fix _sparse_to_dict() misalign bug #39

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

zc277584121
Copy link
Collaborator

No description provided.

@zc277584121 zc277584121 merged commit 781d47c into langchain-ai:main Jan 16, 2025
8 checks passed
@sunwoongc
Copy link

This PR isn't included in the release version yet, right?

@@ -45,9 +56,4 @@ def embed_documents(self, texts: List[str]) -> List[Dict[int, float]]:
return [self._sparse_to_dict(sparse_array) for sparse_array in sparse_arrays]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in here, the sparse_arrays is <class 'scipy.sparse._csr.csr_array'>, though sparse_array is <class 'scipy.sparse._coo.coo_array'>, which raises an error.
I haven't your recommendation to read milvus document, but anyway, the issue can be resolved by changing the code to return [_sparse_to_dict(sparse_arrays)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants