Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model/coherencemodel.py issue - no single core mode #1683

Closed
chriswi93 opened this issue Nov 1, 2017 · 2 comments
Closed

model/coherencemodel.py issue - no single core mode #1683

chriswi93 opened this issue Nov 1, 2017 · 2 comments
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)

Comments

@chriswi93
Copy link

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

@menshikh-iv menshikh-iv added 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) labels Nov 1, 2017
@menshikh-iv
Copy link
Contributor

Thanks for report @chriswi93

horpto added a commit to horpto/gensim that referenced this issue Nov 2, 2017
horpto added a commit to horpto/gensim that referenced this issue Nov 2, 2017
@menshikh-iv
Copy link
Contributor

Fixed in #1685

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
None yet
Development

No branches or pull requests

2 participants