-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
add_faiss_index
raises ValueError: not enough values to unpack (expected 2, got 1)
#6791
Comments
I realized I was passing a string column to this instead of float. Is it possible to add a warning or error to prevent users from falsely believing there's a bug? |
Hello! I agree that we could add some safeguards around the type of I can propose a PR sometime this week. |
@Dref360 thanks for the initiative! |
Describe the bug
Calling
add_faiss_index
on aDataset
with a column argument raises a ValueError. The following is the traceSteps to reproduce the bug
ds = datasets.load_dataset("wikimedia/wikipedia", "20231101.en")["train"]
ds.add_faiss_index('title')
Expected behavior
The index should be created
Environment info
datasets
version: 2.18.0huggingface_hub
version: 0.22.2fsspec
version: 2024.2.0faiss-cpu
version: 1.8.0The text was updated successfully, but these errors were encountered: