Skip to content

feat: added support for all Weaviate HNSW configuration parameters#341

Merged
alaeddine-13 merged 7 commits into
docarray:mainfrom
jjlatval:weaviate-config-update
May 17, 2022
Merged

feat: added support for all Weaviate HNSW configuration parameters#341
alaeddine-13 merged 7 commits into
docarray:mainfrom
jjlatval:weaviate-config-update

Conversation

@jjlatval

Copy link
Copy Markdown
Contributor

The biggest reason for this PR is to enable DocArray to import large datasets (2M+ objects) to Weaviate backend (see https://weaviate.io/developers/weaviate/current/architecture/resources.html#imports-slowed-down-after-crossing-2m-objects---what-can-i-do). The current implementation does not allow passing relevant configuration parameters for Weaviate.

This PR adds support for all currently listed Weaviate HNSW parameters based on the documentation available here: https://weaviate.io/developers/weaviate/current/vector-index-plugins/hnsw.html#how-to-use-hnsw-and-parameters

@davidbp

davidbp commented May 12, 2022

Copy link
Copy Markdown
Contributor

Thanks a lot for your PR.

@davidbp

davidbp commented May 12, 2022

Copy link
Copy Markdown
Contributor

Seems that black test is not passing. Could you run black --skip-string-normalization docarray/array/storage/weaviate/backend.py and commit again backend.py?

@jjlatval

Copy link
Copy Markdown
Contributor Author

Seems that black test is not passing. Could you run black --skip-string-normalization docarray/array/storage/weaviate/backend.py and commit again backend.py?

The test should now pass

@alaeddine-13

Copy link
Copy Markdown
Member

hey @jjlatval , thank you for your contribution. Can you cover the new parameters in the tests in tests/unit/array/test_backend_configuration.py ?

@davidbp

davidbp commented May 13, 2022

Copy link
Copy Markdown
Contributor

Hello, now it seems you need to black --skip-string-normalization to the file test_backend_configuration.py

@codecov

codecov Bot commented May 16, 2022

Copy link
Copy Markdown

Codecov Report

Merging #341 (55d979d) into main (3507ab7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #341   +/-   ##
=======================================
  Coverage   86.19%   86.19%           
=======================================
  Files         134      134           
  Lines        6316     6331   +15     
=======================================
+ Hits         5444     5457   +13     
- Misses        872      874    +2     
Flag Coverage Δ
docarray 86.19% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
docarray/__init__.py 100.00% <100.00%> (ø)
docarray/array/storage/weaviate/backend.py 88.09% <100.00%> (+0.70%) ⬆️
docarray/array/storage/base/seqlike.py 80.76% <0.00%> (-7.70%) ⬇️
docarray/array/storage/sqlite/seqlike.py 85.18% <0.00%> (+2.57%) ⬆️

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 4bef4e7...55d979d. Read the comment docs.

@davidbp davidbp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks @alaeddine-13 for adding the documentation, LGTM

@alaeddine-13 alaeddine-13 merged commit 72aa3b2 into docarray:main May 17, 2022
@jjlatval jjlatval deleted the weaviate-config-update branch May 17, 2022 18:15
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.

3 participants