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

Write Index into memory or Read Index from memory #63

Open
ava57r opened this issue Nov 8, 2022 · 1 comment
Open

Write Index into memory or Read Index from memory #63

ava57r opened this issue Nov 8, 2022 · 1 comment

Comments

@ava57r
Copy link
Collaborator

ava57r commented Nov 8, 2022

Hello.

C++ Faiss supports some methods for saving a index into memory.

write into IOWriter
https://github.com/facebookresearch/faiss/blob/main/faiss/index_io.h#L40
and impl VectorIOWriter https://github.com/facebookresearch/faiss/blob/main/faiss/impl/io.h#L59

read from IOReader
https://github.com/facebookresearch/faiss/blob/main/faiss/index_io.h#L61
and impl VectorIOReader
https://github.com/facebookresearch/faiss/blob/main/faiss/impl/io.h#L53

Could We add these impls into rust library?

@Enet4
Copy link
Owner

Enet4 commented Nov 29, 2022

We would be well served with standard Rust APIs for writers and readers, so that an index can be written to anything implementing std::io::Write and an index can be read from anything implementing std::io::Read. I am not fully familiar with how these data structures operate, but so long as they can work with preallocated input/output buffers, it should be possible to interoperate them.

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

No branches or pull requests

2 participants