Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/4233#discussion_r24105867
--- Diff:
mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala
---
@@ -462,6 +464,42 @@ class LogisticRegressionSuite extends FunSuite with
MLlibTestSparkContext with M
}
+ test("model save/load") {
+ // NOTE: This will need to be generalized once there are multiple
model format versions.
+ val nPoints = 20
+ val A = 2.0
+ val B = -1.5
+
+ val testData = LogisticRegressionSuite.generateLogisticInput(A, B,
nPoints, 42)
+ val testRDD = sc.parallelize(testData, 2)
+ testRDD.cache()
+
+ val lr = new LogisticRegressionWithLBFGS().setIntercept(true)
+ lr.optimizer.setNumIterations(1)
+ val model = lr.run(testRDD)
--- End diff --
Shall we construct a model directly? A unit test for model save/load should
not trigger training.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]