8000 Merge pull request #6324 from chyikwei/fix-lda-joblib-error · scikit-learn/scikit-learn@268af69 · GitHub
[go: up one dir, main page]

Skip to content

Commit 268af69

Browse files
committed
Merge pull request #6324 from chyikwei/fix-lda-joblib-error
[MRG + 1] Fix joblib error in LatentDirichletAllocation (#6258)
2 parents f67e52d + 856424a commit 268af69

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

sklearn/decomposition/online_lda.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,8 @@ def fit(self, X, y=None):
520520
# check perplexity
521521
if evaluate_every > 0 and (i + 1) % evaluate_every == 0:
522522
doc_topics_distr, _ = self._e_step(X, cal_sstats=False,
523-
random_init=False)
523+
random_init=False,
524+
parallel=parallel)
524525
bound = self.perplexity(X, doc_topics_distr,
525526
sub_sampling=False)
526527
if self.verbose:

sklearn/decomposition/tests/test_online_lda.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def test_lda_multi_jobs():
199199
rng = np.random.RandomState(0)
200200
lda = LatentDirichletAllocation(n_topics=n_topics, n_jobs=2,
201201
learning_method=method,
202+
evaluate_every=1,
202203
random_state=rng)
203204
lda.fit(X)
204205

0 commit comments

Comments
 (0)
0