Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/12683#discussion_r61437435
--- Diff: R/pkg/inst/tests/testthat/test_mllib.R ---
@@ -71,7 +71,25 @@ test_that("glm and predict", {
data = iris, family = poisson(link = identity)), iris))
expect_true(all(abs(rVals - vals) < 1e-6), rVals - vals)
- # Test stats::predict is working
+ # Test model save/load
+ modelPath <- tempfile(pattern = "GLM", fileext = ".tmp")
+ ml.save(model, modelPath)
+ expect_error(ml.save(model, modelPath))
+ ml.save(model, modelPath, overwrite = TRUE)
+ m2 <- ml.load(modelPath)
+ s2 <- summary(m2)
+ expect_equal(s$rCoefficients, s2$rCoefficients)
--- End diff --
There is no member variable ```rCoefficients``` in
```summary.GeneralizedLinearRegressionModel```, it should be
```coefficients```. Please refer L89-L98 in test_mllib.R, and the variables in
the following line has the same issues.
---
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]