Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/4811#discussion_r25544222
--- Diff: python/pyspark/mllib/util.py ---
@@ -168,6 +168,64 @@ def loadLabeledPoints(sc, path, minPartitions=None):
return callMLlibFunc("loadLabeledPoints", sc, path, minPartitions)
+class Saveable(object):
+ """
+ Mixin for models and transformers which may be saved as files.
+ """
+
+ def save(self, sc, path):
+ """
+ Save this model to the given path.
+
+ This saves:
+ * human-readable (JSON) model metadata to path/metadata/
+ * Parquet formatted data to path/data/
+
+ The model may be loaded using py:meth:`Loader.load`.
+
+ :param sc: Spark context used to save model data.
+ :param path: Path specifying the directory in which to save
--- End diff --
We should probably note that this will fail if the path already exists. (I
forgot to note this in modelSaveLoad.scala 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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]