aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/ml/util.py
diff options
context:
space:
mode:
authorJoseph K. Bradley <joseph@databricks.com>2016-04-26 12:00:57 -0700
committerJoseph K. Bradley <joseph@databricks.com>2016-04-26 12:00:57 -0700
commit89f082de0e2358ef8352deddcec5f8cc714f4721 (patch)
tree1d73c822e47740dabd6db74034efeec0ec96217a /python/pyspark/ml/util.py
parent302a18686998b8b96546526bfccec9cf5b667386 (diff)
downloadspark-89f082de0e2358ef8352deddcec5f8cc714f4721.tar.gz
spark-89f082de0e2358ef8352deddcec5f8cc714f4721.tar.bz2
spark-89f082de0e2358ef8352deddcec5f8cc714f4721.zip
[SPARK-14903][SPARK-14071][ML][PYTHON] Revert : MLWritable.write property
## What changes were proposed in this pull request? SPARK-14071 changed MLWritable.write to be a property. This reverts that change since there was not a good way to make MLReadable.read appear to be a property. ## How was this patch tested? existing unit tests Author: Joseph K. Bradley <joseph@databricks.com> Closes #12671 from jkbradley/revert-MLWritable-write-py.
Diffstat (limited to 'python/pyspark/ml/util.py')
-rw-r--r--python/pyspark/ml/util.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/python/pyspark/ml/util.py b/python/pyspark/ml/util.py
index dc3914f95e..9d28823196 100644
--- a/python/pyspark/ml/util.py
+++ b/python/pyspark/ml/util.py
@@ -120,14 +120,13 @@ class MLWritable(object):
.. versionadded:: 2.0.0
"""
- @property
def write(self):
"""Returns an MLWriter instance for this ML instance."""
raise NotImplementedError("MLWritable is not yet implemented for type: %r" % type(self))
def save(self, path):
"""Save this ML instance to the given path, a shortcut of `write().save(path)`."""
- self.write.save(path)
+ self.write().save(path)
@inherit_doc
@@ -136,7 +135,6 @@ class JavaMLWritable(MLWritable):
(Private) Mixin for ML instances that provide :py:class:`JavaMLWriter`.
"""
- @property
def write(self):
"""Returns an MLWriter instance for this ML instance."""
return JavaMLWriter(self)