Source: annoy¶
hms-import annoy --index FILE --dim D --metric {angular,euclidean,manhattan,hamming,dot} [--id-map F] [--texts F] [--metadata F] [--namespace NS]
Reads an Annoy index saved with AnnoyIndex.save. Verified against real annoy 1.17; no mocks.
- Items are
0 .. n_items-1and the vectors are read withget_item_vector(Annoy keeps the original vectors, including forangular). Ids arestr(item)unless an id map is given. - Sidecars: same as faiss, aligned to item number.
- Item numbers that were never added (sparse
add_itemids) read back as all-zero vectors. They are indistinguishable from real zero vectors, which HMS cannot store either; they are yielded vector-less and reported underskipped: emptywith their ids. --dimand--metricare not stored in the file. A wrong--dimusually fails to load (reported with that hint) but a wrong--metriccannot be detected and has no effect on the carried vectors.- The file is memory-mapped by Annoy; reading is item by item. Seekable by item number.
Credentials: none.