gensim
gensim copied to clipboard
gensim/test/test_coherencemodel.py: Make testProcesses match implementation
Fixes this error when building on a single-CPU system:
=================================== FAILURES =================================== _______________________ TestCoherenceModel.testProcesses _______________________
self = <gensim.test.test_coherencemodel.TestCoherenceModel testMethod=testProcesses>
def testProcesses(self):
get_model = partial(CoherenceModel,
topics=self.topics1, corpus=self.corpus, dictionary=self.dictionary, coherence='u_mass'
)
model, used_cpus = get_model(), mp.cpu_count() - 1
> self.assertEqual(model.processes, used_cpus)
E AssertionError: 1 != 0
gensim/test/test_coherencemodel.py:152: AssertionError ------------------------------ Captured log call ------------------------------- WARNING gensim.models.ldamodel:ldamodel.py:959 too few updates, training might not converge; consid er increasing the number of passes or iterations to improve accuracy