Replies: 3 comments 5 replies
-
Hey @mlevtov! Great to see you back. Hope you're doing awesome! 🚀 Based on the context provided, it seems that the LlamaIndex codebase does not directly support persisting a vector_store = DocArrayInMemoryVectorStore(index_path="your_index_path")
# Assuming you have your DocumentSummaryIndex instance loaded into vector_store
vector_store.persist("path_to_save_your_index") However, loading the persisted index back into memory is not directly supported. You might need to extend the After loading the index, you can use the methods provided by the On the other hand, the def persist(
self,
persist_path: str = os.path.join(DEFAULT_PERSIST_DIR, DEFAULT_PERSIST_FNAME),
fs: Optional[fsspec.AbstractFileSystem] = None,
) -> None:
"""Persist the SimpleVectorStore to a directory."""
fs = fs or self._fs
dirpath = os.path.dirname(persist_path)
if not fs.exists(dirpath):
fs.makedirs(dirpath)
with fs.open(persist_path, "w") as f:
json.dump(self._data.to_dict(), f) This method demonstrates the capability to persist the data of a Please note that these methods are based on the current state of the LlamaIndex codebase and may not fully meet your requirements for persisting and loading a For more details, you can refer to the source code of the I hope this helps! If you have further questions or need more clarification, feel free to ask. Sources
|
Beta Was this translation helpful? Give feedback.
-
I think loading summary index InMemoryVectorStore it's took huge ram so is there anyother option for storing summary index in vector store in pinecone@dosubot |
Beta Was this translation helpful? Give feedback.
-
I tried finding a solution for this but the base code for |
Beta Was this translation helpful? Give feedback.
-
Hi,
I would like to persist a DocumentSummaryIndex instance in a vector store. At a later time, I would like to load the index from the vector store, retrieve summaries for existing nodes, and add new documents.
I have only been able to find documentation on persisting DocumentSummaryIndex to a file, not to a vector store.
Is this possible. If so, how?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions