Find answers from the community

Updated 4 months ago

Progress

At a glance

The community member is building a VectorStoreIndex and wants to access the progress programmatically, rather than just through the console logs. They couldn't find a way to do this in the documentation or source code. Another community member suggests creating an empty index and inserting documents one at a time, which would allow the progress to be tracked manually. The original poster acknowledges this suggestion and says they might try outputting the logs to a file as a temporary solution until they can find a more robust approach.

Hey, when building a VectorStoreIndex, I know you can add the show_progress=True param to show the progress in the terminal like this:

Plain Text
index = VectorStoreIndex.from_documents(docs, show_progress=True)


But I was wondering if its possible to access the progress programmatically through a callback manager or some other means other than just through what gets logged to the console? I couldn't find anything in the docs, and from what I can tell from the source code, that boolean show_progress param doesn't result in any callback that can be accessed without modifying the source. But idk. Any help would be very appreciated, thanks!
L
M
2 comments
Hmm, no programical access currently!

One option could be to create an empty index, and then insert documents one at a time

Then, you have access to keeping track of progress yourself πŸ‘€
Ah okay, thanks anyways! I might try just ouputting the logs to a file or something and reading them that way until I can find a more robust solution lol
Add a reply
Sign up and join the conversation on Discord