Find answers from the community

s
F
Y
a
P
Updated last month

I'm wondering if this is a bug.

I'm wondering if this is a bug.
L
b
6 comments
How do you know its still running?

Did my own test (default embedding model, openai), and measured the time.

Took 53 seconds to create the index, 0.006 seconds to persist

Plain Text
import time
from llama_index.core import Document, VectorStoreIndex
from llama_index.core.schema import TextNode

text = Document.example().text

nodes = [TextNode(text=text)] * 5000

start = time.time()
index = VectorStoreIndex(nodes=nodes)
end = time.time()
print(f"Index creation took {str(end-start)} seconds")

start = time.time()
index.storage_context.persist()
end = time.time()
print(f"Persist took {str(end-start)} seconds")
I'm doing this in Jupyter Notebook.
Maybe it's a bug with Jupyter.
Thanks for checking! I'll export the notebook to a Python script and see how long it takes the script to run.
Yea maybe it bugged out πŸ‘€
Add a reply
Sign up and join the conversation on Discord