Github user jkbradley commented on a diff in the pull request: https://github.com/apache/spark/pull/11683#discussion_r56217505 --- Diff: python/pyspark/ml/pipeline.py --- @@ -232,6 +203,65 @@ def copy(self, extra=None): stages = [stage.copy(extra) for stage in that.getStages()] return that.setStages(stages) + @since("2.0.0") + def write(self): + """Returns an JavaMLWriter instance for this ML instance.""" + return _PipelineMLWriter(self) + + @since("2.0.0") + def save(self, path): + """Save this ML instance to the given path, a shortcut of `write().save(path)`.""" + self.write().save(path) + + @classmethod + @since("2.0.0") + def read(cls): + """Returns an JavaMLReader instance for this class.""" + return _PipelineMLReader(cls) + + @classmethod + @since("2.0.0") + def load(cls, path): + """Reads an ML instance from the input path, a shortcut of `read().load(path)`.""" + return cls.read().load(path) + + +@inherit_doc +class PipelineModelMLWriter(JavaMLWriter, JavaWrapper): --- End diff -- This should be private too
--- 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