Github user jkbradley commented on a diff in the pull request: https://github.com/apache/spark/pull/12020#discussion_r58596633 --- Diff: python/pyspark/ml/tuning.py --- @@ -112,15 +198,24 @@ class CrossValidator(Estimator, HasSeed): >>> cvModel = cv.fit(dataset) >>> evaluator.evaluate(cvModel.transform(dataset)) 0.8333... + >>> cvPath = temp_path + "/cv" + >>> cv.save(cvPath) + >>> loadedCV = CrossValidator.load(cvPath) + >>> loadedCV.getEstimator().uid == cv.getEstimator().uid --- End diff -- I would recommend not bothering with these comparisons in the doctest since it's part of the documentation. I would put them (and more) in a unit test. Same for TrainValidationSplit
--- 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