ddangelov / Top2Vec

Top2Vec learns jointly embedded topic, document and word vectors.
BSD 3-Clause "New" or "Revised" License
2.94k stars 374 forks source link

FileNotFoundError: Unsuccessful TensorSliceReader constructor #337

Open Keszzz opened 1 year ago

Keszzz commented 1 year ago

I am encountering an error while loading the model.

model = Top2Vec(docs, embedding_model='universal-sentence-encoder-multilingual')

FileNotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for C:\Users\pkola\AppData\Local\Temp\tfhub_modules\26c892ffbc8d7b032f5a95f316e2841ed4f1608c\variables\variables You may be trying to load on a different device from the computational device. Consider setting the experimental_io_device option in tf.saved_model.LoadOptions to the io_device such as '/job:localhost'.

How can I fix it?

Keszzz commented 1 year ago

I have an update here. It seems to be a problem with the embedding method. I swapped to universal-sentence-encoder-multilingual-large and it works fine. It was hard to detect because the error didn’t indicate that and no changes in Top2Vec documentary noticed.