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

Segfault error on faiss.IndexIVFFlat().train #3380

Open
2 tasks
mkandrewhuang301 opened this issue Apr 21, 2024 · 1 comment
Open
2 tasks

Segfault error on faiss.IndexIVFFlat().train #3380

mkandrewhuang301 opened this issue Apr 21, 2024 · 1 comment
Labels

Comments

@mkandrewhuang301
Copy link

Summary

when I run #FAISS
num_vectors, feat_dim = clip_embeds.shape
quantize = faiss.IndexFlatIP(feat_dim)
ivf_index = faiss.IndexIVFFlat(quantize, feat_dim,int(sqrt(num_vectors)),)
ivf_index.train(clip_embeds)
ivf_index.add(clip_embeds)
FAISS_index = {
"video_ids": clip_paths,
"clip_embeds": ivf_index,
}
given video embeddings from clip_embeds, why does my compter crash when it runs the ivf_index.train line

Platform

OS: macOS m1

Faiss version:

Installed from: pip install faiss-cpu

Faiss compilation options:

Running on:
- [ ] CPU

  • GPU

Interface:

  • C++
    - [ ] Python

Reproduction instructions

pip install faiss-cpu
generate vector embeddings
run code for faiss index building

@mdouze
Copy link
Contributor

mdouze commented Apr 23, 2024

This should work.
Please install Faiss with conda, pip is known to cause problems especially on macs.

@mdouze mdouze added the install label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants