Skip to content
Snippets Groups Projects
Commit 3f0f4080 authored by Yanbo Liang's avatar Yanbo Liang Committed by Joseph K. Bradley
Browse files

[SPARK-14298][ML][MLLIB] Add unit test for EM LDA disable checkpointing

## What changes were proposed in this pull request?
This is follow up for #12089, add unit test for EM LDA which test disable checkpointing when set ```checkpointInterval = -1```.
## How was this patch tested?
unit test.

cc jkbradley

Author: Yanbo Liang <ybliang8@gmail.com>

Closes #12286 from yanboliang/spark-14298-followup.
parent 89a41c5b
No related branches found
No related tags found
No related merge requests found
......@@ -289,4 +289,15 @@ class LDASuite extends SparkFunSuite with MLlibTestSparkContext with DefaultRead
assert(model.getCheckpointFiles.isEmpty)
}
test("EM LDA disable checkpointing") {
// Checkpoint dir is set by MLlibTestSparkContext
val lda = new LDA().setK(2).setSeed(1).setOptimizer("em").setMaxIter(3)
.setCheckpointInterval(-1)
val model_ = lda.fit(dataset)
assert(model_.isInstanceOf[DistributedLDAModel])
val model = model_.asInstanceOf[DistributedLDAModel]
assert(model.getCheckpointFiles.isEmpty)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment