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: fix find by vector of n_dim=1 #315

Merged
merged 2 commits into from
Apr 30, 2022
Merged

fix: fix find by vector of n_dim=1 #315

merged 2 commits into from
Apr 30, 2022

Conversation

alaeddine-13
Copy link
Member

@alaeddine-13 alaeddine-13 commented Apr 29, 2022

fix: fix find by vector of n_dim=1
closes: #314

@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #315 (7eac160) into main (da703b0) will decrease coverage by 2.07%.
The diff coverage is 75.00%.

❗ Current head 7eac160 differs from pull request most recent head 950d97e. Consider uploading reports for the commit 950d97e to get more accurate results

@@            Coverage Diff             @@
##             main     #315      +/-   ##
==========================================
- Coverage   86.29%   84.22%   -2.08%     
==========================================
  Files         134      134              
  Lines        6312     6314       +2     
==========================================
- Hits         5447     5318     -129     
- Misses        865      996     +131     
Flag Coverage Δ
docarray 84.22% <75.00%> (-2.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
docarray/array/storage/qdrant/backend.py 95.78% <50.00%> (-0.99%) ⬇️
docarray/__init__.py 100.00% <100.00%> (ø)
docarray/array/storage/weaviate/find.py 89.74% <100.00%> (ø)
docarray/math/evaluation.py 0.00% <0.00%> (-82.15%) ⬇️
docarray/array/mixins/post.py 12.50% <0.00%> (-75.00%) ⬇️
docarray/array/mixins/evaluation.py 19.44% <0.00%> (-69.45%) ⬇️
docarray/helper.py 65.41% <0.00%> (-12.09%) ⬇️
docarray/document/mixins/sugar.py 40.00% <0.00%> (-12.00%) ⬇️
docarray/math/ndarray.py 88.00% <0.00%> (-2.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e2f70e...950d97e. Read the comment docs.

@@ -187,6 +187,9 @@ def _map_embedding(self, embedding: 'ArrayType') -> List[float]:
if embedding.ndim > 1:
embedding = np.asarray(embedding).squeeze()

if embedding.ndim == 0:
Copy link
Member

Choose a reason for hiding this comment

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

when will this happen?

@hanxiao hanxiao merged commit 9f620b0 into main Apr 30, 2022
@hanxiao hanxiao deleted the fix-qdrant-find branch April 30, 2022 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

find fails for qdrant when vector has shape (1)
2 participants