Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There was a problem loading the word vector binary file trained by myself #78

Open
TytTest opened this issue Oct 30, 2022 · 0 comments
Open

Comments

@TytTest
Copy link

TytTest commented Oct 30, 2022

In python 3.8 environment, I used ‘wikipedia2vec train --dim-size 500 --window 10 --iteration 10 --negative 15 enwiki-latest-pages-articles.xml.bz2 wikipedia2vec_2022_500d_10w_10i_15n.pkl’ command to train a word vector, which was saved in the binary file wikipedia2vec_2022_500d_10w_10i_15n.pkl. However, the following problem was prompted in the process of loading with ‘wiki2vec = Wikipedia2Vec.load("/data/data/Wiki/wikipedia2vec_2022_500d_10w_10i_15n.pkl")’ command. How can I solve this problem?

Traceback (most recent call last):
File "func_test.py", line 17, in
wiki2vec = Wikipedia2Vec.load("/data/data/Wiki/wikipedia2vec_2022_500d_10w_10i_15n.pkl")
File "wikipedia2vec/wikipedia2vec.pyx", line 172, in wikipedia2vec.wikipedia2vec.Wikipedia2Vec.load
File "/opt/conda/lib/python3.8/site-packages/joblib/numpy_pickle.py", line 587, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/opt/conda/lib/python3.8/site-packages/joblib/numpy_pickle.py", line 506, in _unpickle
obj = unpickler.load()
File "/opt/conda/lib/python3.8/pickle.py", line 1212, in load
dispatchkey[0]
File "/opt/conda/lib/python3.8/pickle.py", line 1464, in load_frozenset
self.append(frozenset(items))
TypeError: unhashable type: 'memmap'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant