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: Inconsistent use of v3 and v4 Weaviate clients #13719

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

chrisk314
Copy link

@chrisk314 chrisk314 commented May 24, 2024

Description

This PR addresses #13614 which relates to inconsistencies between Weaviate V3 and V4 clients in the llama-index-vector-stores-weaviate implementation. This causes bugs due to breaking API changes between V3 and V4.

All references to Weaviate V3 clients (weaviate.Client) have been changed to Weaviate V4 clients (weaviate.WeaviateClient). The current implementation expects Weaviate V4 clients. Documentation has also been modified to reflect changes.

Additionally, the auth_config argument to WeaviateVectorStore.from_params has been made optional to match the underlying weaviate.WeaviateClient signature.

Fixes #13614

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added new unit/integration tests
  • Added new notebook (that tests end-to-end)
  • I stared at the code and made sure it makes sense

I manually tested the code against a locally running Weaviate database instance. Specifically, I have run the updated example code in the WeaviateVectorStore docstring (changing the Weaviate url as required); and I have manually tested the modified WeaviateVectorStore.from_params method with the same url. Due to the fact that adequately testing the code requires Weaviate infrastructure to test against, and no pattern is currently in place for such integration tests, I have not attempted to add such integration tests in this set of changes.

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran make format; make lint to appease the lint gods

chrisk314 added 2 commits May 24, 2024 10:58
All references to Weaviate V3 clients (weaviate.Client) have been
changed to Weaviate V4 clients (weaviate.WeaviateClient). Documentation
has also been modified to reflect changes.

Additionally, the `auth_config` argument to `WeaviateVectorStore.from_params`
has been made optional to match the underlying `weaviate.WeaviateClient`
signature.
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 24, 2024
@chrisk314 chrisk314 marked this pull request as draft May 24, 2024 10:12
@chrisk314 chrisk314 changed the title Fixup inconsistent use of v3 and v4 Weaviate clients fix: inconsistent use of v3 and v4 Weaviate clients May 24, 2024
@chrisk314 chrisk314 changed the title fix: inconsistent use of v3 and v4 Weaviate clients fix: Inconsistent use of v3 and v4 Weaviate clients May 24, 2024
@chrisk314 chrisk314 marked this pull request as ready for review May 24, 2024 10:46
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels May 24, 2024
@chrisk314
Copy link
Author

Requires review of existing documentation related to Weaviate integration and potential modification of examples to use V4 Weaviate clients.

@RubenGres
Copy link

Is this PR planned to be merged ? It has been five months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: weaviate client has no collection attributes
2 participants