Github user yanboliang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12914#discussion_r62285048
  
    --- Diff: python/pyspark/ml/param/__init__.py ---
    @@ -280,7 +281,9 @@ def explainParam(self, param):
             else:
                 values.append("undefined")
             valueStr = "(" + ", ".join(values) + ")"
    -        return "%s: %s %s" % (param.name, param.doc, valueStr)
    +        # Remove the default value from the doc string
    +        docStr = re.sub(r'\(Default [\w\-\s]+?\)\Z', '', param.doc)
    +        return "%s: %s %s" % (param.name, docStr, valueStr)
    --- End diff --
    
    The regex does not take effect on my local test:
    ```
    >>> import re
    >>> doc = "StorageLevel for ALS model factors. Default: 'MEMORY_AND_DISK'"
    >>> re.sub(r'\(Default [\w\-\s]+?\)\Z', '', doc)
    "StorageLevel for ALS model factors. Default: 'MEMORY_AND_DISK'"
    ```


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to