You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
when I try to save a SparseMatrixSimilarity object using the latest develop code in git, I get a TypeError.
Below is the complete output.
Note also the line: INFO:gensim.similarity.docsim:storing SimmatrixSparseMatrixSimilarity object to False and False.npy doesn't look very correct. (my SimmatrixSparseMatrixSimilarity class just extends SparseMatrixSimilarity and adds custom load/save.. HOLD ON, let me figure this out myself first. probably my own mistake :p )
INFO:gensim.similarity.docsim:creating sparse index
INFO:gensim.matutils:creating sparse matrix from corpus
INFO:gensim.matutils:PROGRESS: at document #0
INFO:gensim.matutils:PROGRESS: at document #10000
INFO:gensim.matutils:PROGRESS: at document #20000
INFO:gensim.matutils:PROGRESS: at document #30000
INFO:gensim.matutils:PROGRESS: at document #40000
INFO:gensim.matutils:PROGRESS: at document #50000
INFO:gensim.matutils:PROGRESS: at document #60000
INFO:gensim.matutils:PROGRESS: at document #70000
INFO:gensim.matutils:PROGRESS: at document #80000
INFO:gensim.matutils:PROGRESS: at document #90000
INFO:gensim.matutils:PROGRESS: at document #100000
INFO:gensim.matutils:PROGRESS: at document #110000
INFO:gensim.matutils:PROGRESS: at document #120000
INFO:gensim.matutils:PROGRESS: at document #130000
INFO:gensim.matutils:PROGRESS: at document #140000
INFO:gensim.matutils:PROGRESS: at document #150000
INFO:gensim.matutils:PROGRESS: at document #160000
INFO:gensim.matutils:PROGRESS: at document #170000
INFO:gensim.similarity.docsim:created <178643x3248178 sparse matrix of type '<type 'numpy.float32'>'
with 14085600 stored elements in Compressed Sparse Row format>
DEBUG:root:build_matrix doc/min: 59928.944920
INFO:gensim.similarity.docsim:storing SimmatrixSparseMatrixSimilarity object to False and False.npy
Traceback (most recent call last):
File "./build-models.py", line 321, in <module>
rebuild_data_files(r, args.tag, args.force) #takes 10minutes or so (most part dictionary)
File "./build-models.py", line 155, in rebuild_data_files
sim.save(force)
File "/usr/local/lib/python2.6/dist-packages/gensim-0.8.0rc1-py2.6.egg/gensim/similarities/docsim.py", line 513, in save
utils.pickle(self, fname) # store array-less object
File "/usr/local/lib/python2.6/dist-packages/gensim-0.8.0rc1-py2.6.egg/gensim/utils.py", line 427, in pickle
with open(fname, 'wb') as fout: # 'b' for binary, needed on Windows
TypeError: coercing to Unicode: need string or buffer, bool found
The text was updated successfully, but these errors were encountered:
Hi,
when I try to save a SparseMatrixSimilarity object using the latest develop code in git, I get a TypeError.
Below is the complete output.
Note also the line:
INFO:gensim.similarity.docsim:storing SimmatrixSparseMatrixSimilarity object to False and False.npy
doesn't look very correct. (mySimmatrixSparseMatrixSimilarity
class just extends SparseMatrixSimilarity and adds custom load/save.. HOLD ON, let me figure this out myself first. probably my own mistake :p )The text was updated successfully, but these errors were encountered: