Github user yanboliang commented on a diff in the pull request: https://github.com/apache/spark/pull/12683#discussion_r61067079 --- Diff: R/pkg/inst/tests/testthat/test_mllib.R --- @@ -126,6 +126,18 @@ test_that("glm summary", { expect_true(abs(baseSummary$deviance - 12.19313) < 1e-4) }) + # Test model save/load + modelPath <- tempfile(pattern = "GLM", fileext = ".tmp") + ml.save(m, modelPath) + expect_error(ml.save(m, modelPath)) + ml.save(m, modelPath, overwrite = TRUE) + m2 <- ml.load(modelPath) + s2 <- summary(m2) + expect_equal(s$rCoefficients, s2$rCoefficients) + expect_equal(s$rFeatures, s2$rFeatures) --- End diff -- I'd like to add more equality test for ```dispersion, deviance, null.deviance, df.null, null, residual, aic```.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org