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

AttributeError: module 'faiss' has no attribute 'GpuParameterSpace' #39

Open
debajyotimaz opened this issue Sep 22, 2023 · 2 comments
Open

Comments

@debajyotimaz
Copy link

While running this part of the code(python==3.10.12 & faiss-gpu==1.7.2):

from retro_pytorch.retrieval import chunks_to_index_and_embed

index, embeddings = chunks_to_index_and_embed(
num_chunks = 1000,
chunk_size = 64,
chunk_memmap_path = './train.chunks.dat'
)

query_vector = embeddings[:1] # use first embedding as query
_, indices = index.search(query_vector, k = 2) # fetch 2 neighbors, first indices should be self

neighbor_embeddings = embeddings[indices] # (1, 2, 768)

image
@KnowingNothing
Copy link

Same problem, any suggestions?

@KnowingNothing
Copy link

I think I know why. Just try
pip uninstall faiss-cpu
and
pip install faiss-gpu

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