Skip to content

Commit e03162b

Browse files
authored
Merge pull request #278 from nmslib/upd0.5
Bump version
2 parents 215526c + 1469702 commit e03162b

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ Header-only C++ HNSW implementation with python bindings. Paper's code for the H
33

44
**NEWS:**
55

6-
* **Thanks to Apoorv Sharma [@apoorv-sharma](https://github.com/apoorv-sharma), hnswlib now supports true element updates (the interface remained the same, but when you the perfromance/memory should not degrade as you update the element embeddings).**
6+
7+
* **hnswlib is now 0.5.0. Added support for pickling indices, support for PEP-517 and PEP-518 building, small speedups, bug and documentation fixes. Many thanks to [@dbespalov](https://github.com/dbespalov), [@dyashuni](https://github.com/dyashuni), [@groodt](https://github.com/groodt),[@uestc-lfs](https://github.com/uestc-lfs), [@vinnitu](https://github.com/vinnitu), [@fabiencastan](https://github.com/fabiencastan), [@JinHai-CN](https://github.com/JinHai-CN), [@js1010](https://github.com/js1010)!**
8+
9+
* **Thanks to Apoorv Sharma [@apoorv-sharma](https://github.com/apoorv-sharma), hnswlib now supports true element updates (the interface remained the same, but when you the performance/memory should not degrade as you update the element embeddings).**
710

811
* **Thanks to Dmitry [@2ooom](https://github.com/2ooom), hnswlib got a boost in performance for vector dimensions that are not multiple of 4**
912

@@ -115,7 +118,7 @@ data_labels = np.arange(num_elements)
115118
# Declaring index
116119
p = hnswlib.Index(space = 'l2', dim = dim) # possible options are l2, cosine or ip
117120

118-
# Initing index - the maximum number of elements should be known beforehand
121+
# Initializing index - the maximum number of elements should be known beforehand
119122
p.init_index(max_elements = num_elements, ef_construction = 200, M = 16)
120123

121124
# Element insertion (can be called several times):
@@ -129,7 +132,7 @@ labels, distances = p.knn_query(data, k = 1)
129132

130133
# Index objects support pickling
131134
# WARNING: serialization via pickle.dumps(p) or p.__getstate__() is NOT thread-safe with p.add_items method!
132-
# Note: ef parameter is included in serialization; random number generator is initialized with random_seeed on Index load
135+
# Note: ef parameter is included in serialization; random number generator is initialized with random_seed on Index load
133136
p_copy = pickle.loads(pickle.dumps(p)) # creates a copy of index p using pickle round-trip
134137

135138
### Index parameters are exposed as class properties:
@@ -158,7 +161,7 @@ data2 = data[num_elements // 2:]
158161
# Declaring index
159162
p = hnswlib.Index(space='l2', dim=dim) # possible options are l2, cosine or ip
160163

161-
# Initing index
164+
# Initializing index
162165
# max_elements - the maximum number of elements (capacity). Will throw an exception if exceeded
163166
# during insertion of an element.
164167
# The capacity can be increased by saving/loading the index, see below.
@@ -192,7 +195,7 @@ print("Saving index to '%s'" % index_path)
192195
p.save_index("first_half.bin")
193196
del p
194197

195-
# Reiniting, loading the index
198+
# Re-initializing, loading the index
196199
p = hnswlib.Index(space='l2', dim=dim) # the space can be changed - keeps the data, alters the distance function.
197200

198201
print("\nLoading index from 'first_half.bin'\n")
@@ -261,7 +264,7 @@ To run the test on 200M SIFT subset:
261264
./main
262265
```
263266

264-
The size of the bigann subset (in millions) is controlled by the variable **subset_size_milllions** hardcoded in **sift_1b.cpp**.
267+
The size of the BigANN subset (in millions) is controlled by the variable **subset_size_millions** hardcoded in **sift_1b.cpp**.
265268

266269
### Updates test
267270
To generate testing data (from root directory):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from setuptools import Extension, setup
88
from setuptools.command.build_ext import build_ext
99

10-
__version__ = '0.4.0'
10+
__version__ = '0.5.0'
1111

1212

1313
include_dirs = [

0 commit comments

Comments
 (0)