solved the good first issue in the hnswlib.py file#1764
Closed
shobhit9957 wants to merge 2 commits intodocarray:mainfrom
Closed
solved the good first issue in the hnswlib.py file#1764shobhit9957 wants to merge 2 commits intodocarray:mainfrom
shobhit9957 wants to merge 2 commits intodocarray:mainfrom
Conversation
Member
|
Hey @shobhit9957, Sorry for the missunderstanding, this is correct, but you will need to implement the private method. |
Author
|
Can you please elaborate on that meaning private method..., how can I do that in private method |
Author
|
hey joan, once check this : def num_docs(self) -> int:
"""
Get the number of documents.
"""
if self._num_docs == 0:
# Replace the old method with the new one
self._num_docs = self._get_num_docs_hnsw()
return self._num_docs
def _get_num_docs_hnsw(self) -> int:
"""
Get the number of documents using the HNSW method.
This method should return the count of documents using the new technique.
"""
# Implement your logic here to get the count using the HNSW method
# For example, you might access some data or perform calculations
# that help you quickly determine the number of documents.
# Then return the count.
return calculated_num_docsis this correct? |
Member
Yes, and this computation shpuld come from inside the hnsw indices |
JoanFM
requested changes
Aug 24, 2023
shobhit9957
added a commit
to shobhit9957/docarray
that referenced
this pull request
Aug 25, 2023
Signed-off-by: Shobhit Kumar <[email protected]>
shobhit9957
added a commit
to shobhit9957/docarray
that referenced
this pull request
Aug 25, 2023
Signed-off-by: Shobhit Kumar <[email protected]>
shobhit9957
added a commit
to shobhit9957/docarray
that referenced
this pull request
Aug 25, 2023
Signed-off-by: Shobhit Kumar <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey Joan, I've done it, according to the issue. I hope it was correct! Thanks for helping Joan.