Repository: spark Updated Branches: refs/heads/master 89a41c5b7 -> 3f0f40800
[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 <yblia...@gmail.com> Closes #12286 from yanboliang/spark-14298-followup. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3f0f4080 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3f0f4080 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3f0f4080 Branch: refs/heads/master Commit: 3f0f40800bda98026f8a5e45c0a4ae2600c2d693 Parents: 89a41c5 Author: Yanbo Liang <yblia...@gmail.com> Authored: Mon Apr 11 14:01:05 2016 -0700 Committer: Joseph K. Bradley <jos...@databricks.com> Committed: Mon Apr 11 14:01:05 2016 -0700 ---------------------------------------------------------------------- .../scala/org/apache/spark/ml/clustering/LDASuite.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/3f0f4080/mllib/src/test/scala/org/apache/spark/ml/clustering/LDASuite.scala ---------------------------------------------------------------------- diff --git a/mllib/src/test/scala/org/apache/spark/ml/clustering/LDASuite.scala b/mllib/src/test/scala/org/apache/spark/ml/clustering/LDASuite.scala index ee8eae8..17d6e9f 100644 --- a/mllib/src/test/scala/org/apache/spark/ml/clustering/LDASuite.scala +++ b/mllib/src/test/scala/org/apache/spark/ml/clustering/LDASuite.scala @@ -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) + } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org