You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/15 12:08:29 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #32185: Branch 3.2

HyukjinKwon commented on a change in pull request #32185:
URL: https://github.com/apache/spark/pull/32185#discussion_r614010944



##########
File path: python/pyspark/ml/util.py
##########
@@ -433,17 +433,16 @@ def _get_metadata_to_save(instance, sc, extraMetadata=None, paramMap=None):
 
         # User-supplied param values
         params = instance._paramMap
-        jsonParams = {}
+
+        jsonParams={}
         if paramMap is not None:
             jsonParams = paramMap
         else:
             for p in params:
                 jsonParams[p.name] = params[p]
 
         # Default param values
-        jsonDefaultParams = {}
-        for p in instance._defaultParamMap:
-            jsonDefaultParams[p.name] = instance._defaultParamMap[p]
+        jsonDefaultParams={p.name:instance._defaultParamMap[p] for p in instance._defaultParamMap}

Review comment:
       This is more a personal preference. I don't see any gain by this, and don't think we should fix these. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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