Conversation
…ex initial size doesn't match the actual size upon loading
Codecov Report
@@ Coverage Diff @@
## main #113 +/- ##
==========================================
+ Coverage 89.24% 89.25% +0.01%
==========================================
Files 39 39
Lines 1803 1806 +3
==========================================
+ Hits 1609 1612 +3
Misses 194 194
Continue to review full report at Codecov.
|
|
|
||
| data_level0_memory_ = (char *)this->allocator->allocate(max_elements_ * size_data_per_element_); | ||
| data_level0_memory_ = | ||
| (char *)this->allocator->callocate(max_elements_ * size_data_per_element_); |
There was a problem hiding this comment.
valgrind is shouting if we try to write uninitialised memory to a file, and that is what happening when we save an index which has less elements than max_elements (as all the memory is allocated in advanced...)
|
|
||
| # Create an HNSW index from dataset based on specific params. | ||
| def create_hnsw_index(dataset, ef_construction, M): | ||
| X_train = np.array(dataset['train']) |
There was a problem hiding this comment.
X_train =>> x ? we are not training, right?
also, distance =>> metric
There was a problem hiding this comment.
This is ANN terminology... The vectors the we insert to the index are the "train set", and the vector for which we perform Top K search are the "test set"
Waiting for #108