GitHub user jkbradley opened a pull request:
https://github.com/apache/spark/pull/12480
[SPARK-14714][ML][PYTHON] Fixed issues with non-kwarg typeConverter arg for
Param constructor
## What changes were proposed in this pull request?
PySpark Param constructors need to pass the TypeConverter argument by name,
partly to make sure it is not mistaken for the expectedType arg and partly
because we will remove the expectedType arg in 2.1. In several places, this is
not being done correctly.
This PR changes all usages in pyspark/ml/ to keyword args.
## How was this patch tested?
Existing unit tests. I will not test type conversion for every Param
unless we really think it necessary.
Also, if you start the PySpark shell and import classes (e.g.,
pyspark.ml.feature.StandardScaler), then you no longer get this warning:
```
/Users/josephkb/spark/python/pyspark/ml/param/__init__.py:58: UserWarning:
expectedType is deprecated and will be removed in 2.1. Use typeConverter
instead, as a keyword argument.
"Use typeConverter instead, as a keyword argument.")
```
That warning came from the typeConverter argument being passes as the
expectedType arg by mistake.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jkbradley/spark typeconverter-fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/12480.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #12480
----
commit 9411098d93cda784e225dc87f6692a3088e757ff
Author: Joseph K. Bradley <[email protected]>
Date: 2016-04-18T20:07:05Z
Fixed issues with non-kwarg typeConverter arg for Param constructor
----
---
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]