type object 'MissingDependency' has no attribute 'load' #3092
-
So I was trying to load a saved model and Got this error..I am adding my written code and snippet here. This error happened while I was trying things on my local machine new_document_store = FAISSDocumentStore.load("./faiss.index") Another Error I Got While Working with google colab.. Both of these error is regarding Loading saved files and index. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi, For the first part
Let me know if you had already done it but still get this issue. My guess is you ran a notebook with For the second partWhat is probably happening is that the And do the same when creating it again for loading. Background and more details:
So for One option is to directly initialize instead of calling FAISSDocumentStore(faiss_index_path="<your-path>.faiss",
faiss_config_path="<your-path>.json",
validate_index_sync=False) but I guess having index/embeddings without documents doesn't make sense. |
Beta Was this translation helpful? Give feedback.
Hi,
For the first part
faiss
is part of the optional dependencies. So during installation you'll need to specify it also be installed.pip install farm-haystack[faiss]
Let me know if you had already done it but still get this issue. My guess is you ran a notebook with
[faiss]
included but this notebook doesn't do it when installing haystack (?)For the second part
What is probably happening is that the
faiss_document_store.db
file is missing during your second run.Solution: You need to save that too into Drive. For this, you can pass the location as
FAISSDocumentStore(sql_url="sqlite:///content/drive/MyDrive/Dataset/faiss_document_store.db", ...)
when first creating it.And do the same w…