ContinuumIO / topik

A Topic Modeling toolbox
BSD 3-Clause "New" or "Revised" License
92 stars 24 forks source link

lda broken with gensim 0.12.3 #60

Open youngblood opened 9 years ago

youngblood commented 9 years ago

works with 0.12.2 (current latest via conda), but broken with 0.12.3 (current latest via pip)

msarahan commented 9 years ago

Please post any error output you can

youngblood commented 9 years ago

ERROR: topik.simple_run.tests.test_run_api.test_run

Traceback (most recent call last): File "/Users/ryoungblood/anaconda/envs/topik_demo5/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(_self.arg) File "/Users/ryoungblood/topik/topik/simple_run/tests/test_run_api.py", line 9, in test_run termite_plot=True, lda_vis=False) File "/Users/ryoungblood/topik/topik/simple_run/run.py", line 67, in run_pipeline model = models.registered_models[model](vectorized_data, ntopics=ntopics, *kwargs) File "/Users/ryoungblood/topik/topik/models/lda.py", line 80, in lda return ModelOutput(vectorized_output, _LDA, ntopics=ntopics, _kwargs) File "/Users/ryoungblood/topik/topik/models/base_model_output.py", line 20, in init vectorized_corpus, **kwargs) File "/Users/ryoungblood/topik/topik/models/lda.py", line 72, in _LDA for topic_no in range(ntopics)} File "/Users/ryoungblood/topik/topik/models/lda.py", line 72, in for topic_no in range(ntopics)} File "/Users/ryoungblood/topik/topik/models/lda.py", line 13, in _topic_term_to_array return [term_scores[id_term_map[id]] for id in range(len(id_term_map))] KeyError: u'limited'

msarahan commented 9 years ago

Thanks. I saw this kind of error at one point. I'm not sure it is an error in Gensim. I think it's somewhere in our code. This might be as simple as using id_term_map when you want term_id_map.