Github user akopich commented on a diff in the pull request: https://github.com/apache/spark/pull/19565#discussion_r147208156 --- Diff: mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAOptimizer.scala --- @@ -446,14 +445,14 @@ final class OnlineLDAOptimizer extends LDAOptimizer with Logging { override private[clustering] def next(): OnlineLDAOptimizer = { val batch = docs.sample(withReplacement = sampleWithReplacement, miniBatchFraction, randomGenerator.nextLong()) - if (batch.isEmpty()) return this submitMiniBatch(batch) } /** * Submit a subset (like 1%, decide by the miniBatchFraction) of the corpus to the Online LDA * model, and it will update the topic distribution adaptively for the terms appearing in the * subset. + * The methods assumes no empty documents are submitted. --- End diff -- Thank you. I'll add it.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org