piskvorky / gensim

Topic Modelling for Humans
https://radimrehurek.com/gensim
GNU Lesser General Public License v2.1
15.66k stars 4.38k forks source link

DTM mode = ‘time’ ERROR #2462

Open YanJohn opened 5 years ago

YanJohn commented 5 years ago

Problem description

My code runs well when the mode is the default 'fit',but I wanna use the 'time' mode to analysis the corpus through time to see the topics in different times.But the 'time'mode seems not work.

At first it's the error returned from the gensim.utils :"returned non-zero exit status 1".

After I rewrite some code in utils.py,new errors occured that all the codes with the "np.loadtxt" in the dtmmodel dont work,actually all the txt are missing.

Do I use the 'time' in a wrong way or what?Or the 'time' mode dont work at all? What are you trying to achieve? What is the expected result? What are you seeing instead?

Steps/code/corpus to reproduce

model = DtmModel(path_to_dtm_binary,corpus = corpus,time_slices=[1] * len(corpus),id2word=dic,num_topics = num_topics,alpha = alpha,mode='fit')#this works well

dtm_time = DtmModel(path_to_dtm_binary,corpus = corpus,time_slices=[1] * len(corpus),id2word=dic,num_topics = num_topics,alpha = alpha,mode='time')

returns this error after I rewrite the code in utils.py.Before that,it returns the"returned non-zero exit status 1",which was the function:check_output error

OSError: C:\Users\Mamba\AppData\Local\Temp\ecbee0_train_out/lda-seq/gam.dat not found.

Versions

Please provide the output of:

import platform; print(platform.platform())
Windows-10-10.0.17763-SP0
import sys; print("Python", sys.version)
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)]
import numpy; print("NumPy", numpy.__version__)
NumPy 1.16.2
import scipy; print("SciPy", scipy.__version__)
SciPy 1.2.1
import gensim; print("gensim", gensim.__version__)
gensim 3.4.0
from gensim.models import word2vec;print("FAST_VERSION", word2vec.FAST_VERSION)
FAST_VERSION 1
ByungjunKim commented 4 years ago

me too!

piskvorky commented 4 years ago

Sorry, the DTM wrapper was contributed externally and is not maintained. I don't know what's wrong, but you could try tracking down its original contributor to ask him/her, or debugging yourself.

We plan to remove theses wrappers from Gensim completely in one of the future releases.