Github user holdenk commented on a diff in the pull request:
https://github.com/apache/spark/pull/12914#discussion_r62285684
--- 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 --
So this filters the auto generated ones that get added. For other strings I
think its up to the creator of the param to follow the format if they want the
standard behaviour. I don't think we need to catch all of them this is just for
nicer display during explain.
---
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]