You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by me...@apache.org on 2016/04/18 22:31:51 UTC
spark git commit: [SPARK-14440][PYSPARK] Remove pipeline specific
reader and writer
Repository: spark
Updated Branches:
refs/heads/master 28ee15702 -> f31a62d1b
[SPARK-14440][PYSPARK] Remove pipeline specific reader and writer
## What changes were proposed in this pull request?
https://issues.apache.org/jira/browse/SPARK-14440
Remove
* PipelineMLWriter
* PipelineMLReader
* PipelineModelMLWriter
* PipelineModelMLReader
and modify comments.
## How was this patch tested?
test with unit test.
Author: Xusen Yin <yi...@gmail.com>
Closes #12216 from yinxusen/SPARK-14440.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f31a62d1
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f31a62d1
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f31a62d1
Branch: refs/heads/master
Commit: f31a62d1b24aea8ddfa40b60378ce065518786e4
Parents: 28ee157
Author: Xusen Yin <yi...@gmail.com>
Authored: Mon Apr 18 13:31:48 2016 -0700
Committer: Xiangrui Meng <me...@databricks.com>
Committed: Mon Apr 18 13:31:48 2016 -0700
----------------------------------------------------------------------
python/pyspark/ml/pipeline.py | 53 +++++---------------------------------
1 file changed, 7 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/f31a62d1/python/pyspark/ml/pipeline.py
----------------------------------------------------------------------
diff --git a/python/pyspark/ml/pipeline.py b/python/pyspark/ml/pipeline.py
index 6f599b5..e2651ae 100644
--- a/python/pyspark/ml/pipeline.py
+++ b/python/pyspark/ml/pipeline.py
@@ -30,24 +30,6 @@ from pyspark.mllib.common import inherit_doc
@inherit_doc
-class PipelineMLWriter(JavaMLWriter):
- """
- Private Pipeline utility class that can save ML instances through their Scala implementation.
-
- We can currently use JavaMLWriter, rather than MLWriter, since Pipeline implements _to_java.
- """
-
-
-@inherit_doc
-class PipelineMLReader(JavaMLReader):
- """
- Private utility class that can load Pipeline instances through their Scala implementation.
-
- We can currently use JavaMLReader, rather than MLReader, since Pipeline implements _from_java.
- """
-
-
-@inherit_doc
class Pipeline(Estimator, MLReadable, MLWritable):
"""
A simple pipeline, which acts as an estimator. A Pipeline consists
@@ -154,8 +136,8 @@ class Pipeline(Estimator, MLReadable, MLWritable):
@since("2.0.0")
def write(self):
- """Returns an JavaMLWriter instance for this ML instance."""
- return PipelineMLWriter(self)
+ """Returns an MLWriter instance for this ML instance."""
+ return JavaMLWriter(self)
@since("2.0.0")
def save(self, path):
@@ -166,7 +148,7 @@ class Pipeline(Estimator, MLReadable, MLWritable):
@since("2.0.0")
def read(cls):
"""Returns an MLReader instance for this class."""
- return PipelineMLReader(cls)
+ return JavaMLReader(cls)
@classmethod
def _from_java(cls, java_stage):
@@ -202,27 +184,6 @@ class Pipeline(Estimator, MLReadable, MLWritable):
@inherit_doc
-class PipelineModelMLWriter(JavaMLWriter):
- """
- Private PipelineModel utility class that can save ML instances through their Scala
- implementation.
-
- We can (currently) use JavaMLWriter, rather than MLWriter, since PipelineModel implements
- _to_java.
- """
-
-
-@inherit_doc
-class PipelineModelMLReader(JavaMLReader):
- """
- Private utility class that can load PipelineModel instances through their Scala implementation.
-
- We can currently use JavaMLReader, rather than MLReader, since PipelineModel implements
- _from_java.
- """
-
-
-@inherit_doc
class PipelineModel(Model, MLReadable, MLWritable):
"""
Represents a compiled pipeline with transformers and fitted models.
@@ -254,8 +215,8 @@ class PipelineModel(Model, MLReadable, MLWritable):
@since("2.0.0")
def write(self):
- """Returns an JavaMLWriter instance for this ML instance."""
- return PipelineModelMLWriter(self)
+ """Returns an MLWriter instance for this ML instance."""
+ return JavaMLWriter(self)
@since("2.0.0")
def save(self, path):
@@ -265,8 +226,8 @@ class PipelineModel(Model, MLReadable, MLWritable):
@classmethod
@since("2.0.0")
def read(cls):
- """Returns an JavaMLReader instance for this class."""
- return PipelineModelMLReader(cls)
+ """Returns an MLReader instance for this class."""
+ return JavaMLReader(cls)
@classmethod
def _from_java(cls, java_stage):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org