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

TypeError: slice indices must be integers or None or have an __index__ method #194

Open
mishra-18 opened this issue Apr 11, 2024 · 2 comments

Comments

@mishra-18
Copy link

Hi,
I've been making attempts to use RAGatouille for document retrievals. I'm currently testing it on a junk of 30k emails. After indexing a few of the documents I would want to use the add_to_index function to add new documents to the index. I'm adding 1000 new documents in a loop using add_to_index but it fails to do so after 21 iterations or after indexing 20000 documents and throws:

TypeError: slice indices must be integers or None or have an __index__ method

I've written all this code in this saved Kaggle notebook. I would request you to check it out.

I've tested this multiple times for different numbers and lengths of chunks and seems to give the same TypeError after indexing a particular amount of document chunks.

@bclavie
Copy link
Owner

bclavie commented Apr 12, 2024

Hey, thank you, this is interesting. CRUD is still in a bit of an odd situation (cc @anirudhdharmarajan @jlscheerer) so this is appreciated. It seems like your notebook isn't public -- I get a 404 when trying to access it.

@mishra-18
Copy link
Author

mishra-18 commented Apr 13, 2024

Hey @bclavie, thanks for responding, I've made the notebook public you can check it out now.

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

No branches or pull requests

2 participants