model/coherencemodel.py issue - no single core mode #1683
Labels
bug
Issue described a bug
difficulty easy
Easy issue: required small fix
good first issue
Issue for new contributors (not required gensim understanding + very simple)
Description
model/coherencemodel.py can not be used in single core mode.
Steps/Code/Corpus to Reproduce
line 218
self.processes = processes if processes > 1 else max(1, mp.cpu_count() - 1)
Expected Results
If I choose processes parameter = 1 for TopicCoherence, self.processes should be 1, too.
Actual Results
If I choose processes parameter = 1 for TopicCoherence, self.processes is mp.cpu_count() - 1. In my case self.processes = 3.
Solution
line 218
self.processes = processes if processes >= 1 else max(1, mp.cpu_count() - 1)
Versions
Windows-10-10.0.14393-SP0
Python 3.5.2 |Enthought, Inc. (x86_64)| (default, Mar 2 2017, 16:37:47) [MSC v.1900 64 bit (AMD64)]
NumPy 1.13.3
SciPy 1.0.0
gensim 3.0.1
FAST_VERSION 0
The text was updated successfully, but these errors were encountered: