GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — feat: update for inmemory index by jupyterjazz · Pull Request #1724 · docarray/docarray
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Conversation
Contributor
Implements Update for In terms of performance, we see significant ~130x (from 0.0266s to 0.0002s) improvement in get, and a slight increase in the index time - approx. from 3.50s to 3.57s; Other operation times stayed very similar. Experiment was made on 200 000 docs, vector dim 128.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsSigned-off-by: jupyterjazz <[email protected]>
|
There was an error while loading. Please reload this page.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@ ## main #1724 +/- ## ========================================== - Coverage 85.57% 85.54% -0.04% ========================================== Files 133 133 Lines 8592 8608 +16 ========================================== + Hits 7353 7364 +11 - Misses 1239 1244 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can you also add how much more memory is used? I am not sure this is desired. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Not much change in terms of memory too. Here's the experiment code from docarray.index import InMemoryExactNNIndex from docarray import BaseDoc from docarray.typing import NdArray import numpy as np import tracemalloc tracemalloc.start() class MyDoc(BaseDoc): text: str embedding: NdArray[128] data = [MyDoc(text=f'text {i}', embedding=np.random.rand(128)) for i in range(200000)] doc_index = InMemoryExactNNIndex[MyDoc]() doc_index.index(data) docs, scores = doc_index.find(data[0], search_field='embedding') if data[10] in doc_index: print('wohoo') ids_to_get = [data[200].id, data[250].id, data[350].id] docs = doc_index[ids_to_get] ids_to_del = [data[200].id, data[250].id, data[350].id] del doc_index[ids_to_del] print(tracemalloc.get_traced_memory()) tracemalloc.stop() Before change prints (768773718, 1032141402) showing current memory usage and max memory usage |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
📝 Docs are deployed on https://ft-feat-inmemory-update--jina-docs.netlify.app 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
feat: support update for inmemory index
There was an error while loading. Please reload this page.