spark-instrumented-optimizer/python/pyspark/ml/param
Bryan Cutler d8813fa043 [SPARK-13625][PYSPARK][ML] Added a check to see if an attribute is a property when getting param list
## What changes were proposed in this pull request?

Added a check in pyspark.ml.param.Param.params() to see if an attribute is a property (decorated with `property`) before checking if it is a `Param` instance.  This prevents the property from being invoked to 'get' this attribute, which could possibly cause an error.

## How was this patch tested?

Added a test case with a class has a property that will raise an error when invoked and then call`Param.params` to verify that the property is not invoked, but still able to find another property in the class.  Also ran pyspark-ml test before fix that will trigger an error, and again after the fix to verify that the error was resolved and the method was working properly.

Author: Bryan Cutler <cutlerb@gmail.com>

Closes #11476 from BryanCutler/pyspark-ml-property-attr-SPARK-13625.
2016-03-08 17:34:25 -08:00
..
__init__.py [SPARK-13625][PYSPARK][ML] Added a check to see if an attribute is a property when getting param list 2016-03-08 17:34:25 -08:00
_shared_params_code_gen.py [SPARK-10509][PYSPARK] Reduce excessive param boiler plate code 2016-01-26 15:53:48 -08:00
shared.py [SPARK-10509][PYSPARK] Reduce excessive param boiler plate code 2016-01-26 15:53:48 -08:00