-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
cPickle error when saving similarity matrix #7
Comments
Hmm, not sure if that's a bug or a feature. The Anyway I guess in your case the problem is more simple. You're storing a transformed corpus, like I'll have to sit down and think about the design of the more general case though, maybe I should change the interface so that all corpora must support un/pickling? |
I'm closing this issue; Alan, let me know if you encounter problems applying the changes or if something else comes up. |
Note: applies only to similarities.Similarity and not similarities.MatrixSimilarity similarities.SparseMatrixSimilarity.
After being created, attempting to save similarities.Similarity matrix results in error when using cPickle.
Traceback (most recent call last):
File "/Users/alan/Projects/LSIA/docs/code/Similarities01.py", line 45, in
Q = querier(corpus)
File "/Users/alan/Projects/LSIA/docs/code/Similarities01.py", line 15, in init
self.index.save(self.workdir+'/ops/sims.index')
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/gensim-0.7.7-py2.6.egg/gensim/utils.py", line 120, in save
cPickle.dump(self, f, protocol=-1) # -1 to use the highest available protocol, for efficiency
PicklingError: Can't pickle <class 'gensim.interfaces.TransformedCorpus'>: attribute lookup gensim.interfaces.TransformedCorpus failed
Gensim 0.7.7 on OSX.
The text was updated successfully, but these errors were encountered: