Github user hhbyyh commented on a diff in the pull request:
https://github.com/apache/spark/pull/19565#discussion_r148438759
--- 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
--- End diff --
If still you want to remove the line, would you please add a unit test to
ensure `submitMiniBatch` can handle empty rdd? Thanks.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]