hi all, I'm trying to figure out how to reload an index from persistent storage but I'm getting errors:
#create an index
d = 1536
faiss_index = faiss.IndexFlatL2(d)
vector_store = FaissVectorStore(faiss_index)
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex.from_documents(storage_context=storage_context,documents=documents)
#index works
#to store:
index.storage_context.persist()
#reload
vector_store = FaissVectorStore.from_persist_dir('./storage')
storage_context = StorageContext.from_defaults(vector_store=vector_store)
#this index doesnt work
index = load_index_from_storage(storage_context=storage_context)
#ValueError: No index in storage context, check if you specified the right persist_dir.