Skip to content
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

Index map #3

Open
matsui528 opened this issue Aug 12, 2018 · 2 comments
Open

Index map #3

matsui528 opened this issue Aug 12, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@matsui528
Copy link
Owner

matsui528 commented Aug 12, 2018

Currently, an index for each item is automatically assigned sequentially. With a wrapper with an index mapper, any index can be assigned for each item, e.g.:

e = rii.RiiIDMap(codec)
vecs = np.random.random((3, D)).astype(np.float32)
ids = [1254, 23, 445]
e.add_configure(vecs=X, ids=ids)

This will support a remove function as well.

e.remove(id=23)

Ref: https://github.com/facebookresearch/faiss/wiki/Pre--and-post-processing#the-indexidmap

@matsui528 matsui528 added the enhancement New feature or request label Aug 12, 2018
@mireklzicar
Copy link

Hi! I am a big fan of this enhancement. Is it still planned to do? Is it also possible to remove vectors in current version of Rii, or is the IDMap a necessary feature to allow it?

@matsui528
Copy link
Owner Author

Thank you 🙌 Please try to implement it. The current version of rii does not support the deletion. IDMap could implement shallow deletion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants