spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mln...@apache.org
Subject spark git commit: [SPARK-15500][DOC][ML][PYSPARK] Remove default value in Param doc field in ALS
Date Wed, 25 May 2016 18:42:23 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-2.0 6fc367e50 -> 409eb28f7


[SPARK-15500][DOC][ML][PYSPARK] Remove default value in Param doc field in ALS

Remove "Default: MEMORY_AND_DISK" from `Param` doc field in ALS storage level params. This
fixes up the output of `explainParam(s)` so that default values are not displayed twice.

We can revisit in the case that [SPARK-15130](https://issues.apache.org/jira/browse/SPARK-15130)
moves ahead with adding defaults in some way to PySpark param doc fields.

Tests N/A.

Author: Nick Pentreath <nickp@za.ibm.com>

Closes #13277 from MLnick/SPARK-15500-als-remove-default-storage-param.

(cherry picked from commit 1cb347fbc446092b478ae0578fc7d1b0626a9294)
Signed-off-by: Nick Pentreath <nickp@za.ibm.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/409eb28f
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/409eb28f
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/409eb28f

Branch: refs/heads/branch-2.0
Commit: 409eb28f7219778d2aba36079c20c84c8d31b604
Parents: 6fc367e
Author: Nick Pentreath <nickp@za.ibm.com>
Authored: Wed May 25 20:41:53 2016 +0200
Committer: Nick Pentreath <nickp@za.ibm.com>
Committed: Wed May 25 20:42:11 2016 +0200

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/ml/recommendation/ALS.scala    | 4 ++--
 python/pyspark/ml/recommendation.py                            | 6 ++----
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/409eb28f/mllib/src/main/scala/org/apache/spark/ml/recommendation/ALS.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/recommendation/ALS.scala b/mllib/src/main/scala/org/apache/spark/ml/recommendation/ALS.scala
index f257382..8dc7437 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/recommendation/ALS.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/recommendation/ALS.scala
@@ -180,7 +180,7 @@ private[recommendation] trait ALSParams extends ALSModelParams with HasMaxIter
w
    * @group expertParam
    */
   val intermediateStorageLevel = new Param[String](this, "intermediateStorageLevel",
-    "StorageLevel for intermediate datasets. Cannot be 'NONE'. Default: 'MEMORY_AND_DISK'.",
+    "StorageLevel for intermediate datasets. Cannot be 'NONE'.",
     (s: String) => Try(StorageLevel.fromString(s)).isSuccess && s != "NONE")
 
   /** @group expertGetParam */
@@ -194,7 +194,7 @@ private[recommendation] trait ALSParams extends ALSModelParams with HasMaxIter
w
    * @group expertParam
    */
   val finalStorageLevel = new Param[String](this, "finalStorageLevel",
-    "StorageLevel for ALS model factors. Default: 'MEMORY_AND_DISK'.",
+    "StorageLevel for ALS model factors.",
     (s: String) => Try(StorageLevel.fromString(s)).isSuccess)
 
   /** @group expertGetParam */

http://git-wip-us.apache.org/repos/asf/spark/blob/409eb28f/python/pyspark/ml/recommendation.py
----------------------------------------------------------------------
diff --git a/python/pyspark/ml/recommendation.py b/python/pyspark/ml/recommendation.py
index bac2a30..1778bfe 100644
--- a/python/pyspark/ml/recommendation.py
+++ b/python/pyspark/ml/recommendation.py
@@ -120,12 +120,10 @@ class ALS(JavaEstimator, HasCheckpointInterval, HasMaxIter, HasPredictionCol,
Ha
                         "whether to use nonnegative constraint for least squares",
                         typeConverter=TypeConverters.toBoolean)
     intermediateStorageLevel = Param(Params._dummy(), "intermediateStorageLevel",
-                                     "StorageLevel for intermediate datasets. Cannot be 'NONE'.
" +
-                                     "Default: 'MEMORY_AND_DISK'.",
+                                     "StorageLevel for intermediate datasets. Cannot be 'NONE'.",
                                      typeConverter=TypeConverters.toString)
     finalStorageLevel = Param(Params._dummy(), "finalStorageLevel",
-                              "StorageLevel for ALS model factors. " +
-                              "Default: 'MEMORY_AND_DISK'.",
+                              "StorageLevel for ALS model factors.",
                               typeConverter=TypeConverters.toString)
 
     @keyword_only


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message