-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat: index drivers update and delete #1460
Conversation
Latency summaryCurrent PR yields:
Breakdown
Backed by latency-tracking. Further commits will update this comment. |
# Conflicts: # jina/clients/__init__.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
watch out! U are bringing changes to the hub submodule in this PR
I reverted the changes thanks. |
# Conflicts: # jina/clients/__init__.py
Codecov Report
@@ Coverage Diff @@
## master #1460 +/- ##
==========================================
+ Coverage 84.26% 84.79% +0.52%
==========================================
Files 108 108
Lines 6336 6417 +81
==========================================
+ Hits 5339 5441 +102
+ Misses 997 976 -21
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing unit tests for driver with delete and update method
…rivers-update-and-delete # Conflicts: # jina/executors/__init__.py # jina/executors/indexers/vector.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Watch out there are changes in the hub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor things! Did not notice we did not have test_vector_index_driver
@@ -18,6 +18,14 @@ def add(self, keys: Iterator[int], values: Iterator[bytes], *args, **kwargs): | |||
for key, value in zip(keys, values): | |||
self.docs[key] = value | |||
|
|||
def update(self, keys: Iterator[int], values: Iterator[bytes], *args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u can pass with these, I think these 2 methods won't be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are used here: SimpleKVIndexDriver(method='update')
However, I van remove the other methods: query, get_query_handler...
for key, value in zip(keys, vectors): | ||
self.docs[key] = value | ||
|
||
def update(self, keys: Iterator[int], values: Iterator[bytes], *args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are also these used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes in line 63
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pytest.fixture(scope='function')
def simple_kv_indexer_driver_update():
return SimpleVectorIndexDriver(method='update')
@pytest.fixture(scope='function')
def simple_kv_indexer_driver_delete():
return SimpleVectorIndexDriver(method='delete')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this is MockGroundTruthVectorIndexer
not SimpleVectorIndexDriver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but the executor is attached to that driver and sets the _exec
function accordingly.
simple_vector_indexer_driver_add.attach(executor=mock_groundtruth_indexer, pea=None)
…rivers-update-and-delete # Conflicts: # tests/unit/drivers/test_kv_index_driver.py
Related ticket https://jinaai.atlassian.net/browse/JINACORE-552