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

VectorStore bug fix #2420

Merged
merged 5 commits into from
Jun 9, 2023
Merged

VectorStore bug fix #2420

merged 5 commits into from
Jun 9, 2023

Conversation

adolkhan
Copy link
Contributor

@adolkhan adolkhan commented Jun 8, 2023

🚀 🚀 Pull Request

Checklist:

  • My code follows the style guidelines of this project and the Contributing document
  • I have commented my code, particularly in hard-to-understand areas
  • I have kept the coverage-rate up
  • I have performed a self-review of my own code and resolved any problems
  • I have checked to ensure there aren't any other open Pull Requests for the same change
  • I have described and made corresponding changes to the relevant documentation
  • New and existing unit tests pass locally with my changes

Changes

@adolkhan adolkhan changed the title bug fix VectorStore bug fix Jun 8, 2023
@adolkhan adolkhan marked this pull request as draft June 8, 2023 07:46
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Patch coverage: 28.57% and project coverage change: -0.03 ⚠️

Comparison is base (68167ea) 84.69% compared to head (88407a9) 84.67%.

❗ Current head 88407a9 differs from pull request most recent head 379f19e. Consider uploading reports for the commit 379f19e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2420      +/-   ##
==========================================
- Coverage   84.69%   84.67%   -0.03%     
==========================================
  Files         326      326              
  Lines       37552    37548       -4     
==========================================
- Hits        31806    31795      -11     
- Misses       5746     5753       +7     
Flag Coverage Δ
unittests 84.67% <28.57%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
deeplake/core/vectorstore/deeplake_vectorstore.py 100.00% <ø> (ø)
...lake/core/vectorstore/test_deeplake_vectorstore.py 64.39% <20.00%> (-1.00%) ⬇️
deeplake/core/vectorstore/vector_search/utils.py 91.30% <50.00%> (-0.74%) ⬇️

... and 21 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@adolkhan adolkhan marked this pull request as ready for review June 8, 2023 17:29
@tatevikh tatevikh requested a review from FayazRahman June 9, 2023 10:29
if kwargs["embedding_data"] is None and kwargs["embedding_function"] is not None:
raise ValueError(
f"When an `embedding_function` is specified, `embedding_data` must also be specified."
)

if (
Copy link
Contributor

Choose a reason for hiding this comment

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

is this logic correct? The error does not seem to match the check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup, error message should say a vice versa

@@ -99,11 +100,26 @@ def parse_search_args(**kwargs):
raise ValueError(
f"Either an `embedding`, `embedding_function`, `filter`, or `query` must be specified."
)

if kwargs["embedding"] is not None and kwargs["embedding_function"]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be kwargs["embedding_data"] here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. The idea was that embedding is the embedding data, but since now we have embedding_data which serves a bit different purpose, this error message is confusing.


utils.parse_search_args(
embedding_data=embedding_data,
embedding_function=embedding_function,
initial_embedding_function=self.embedding_function,
Copy link
Contributor

Choose a reason for hiding this comment

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

is this used to change the embedding function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the idea is that embedding function can be specified from the very beginning, which is called initial_embedding_function

@adolkhan adolkhan merged commit 38a0449 into main Jun 9, 2023
@adolkhan adolkhan deleted the DeepLakeVectorStore_minor_bugs branch June 9, 2023 11:12
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