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

    https://github.com/apache/spark/pull/11663#discussion_r56406671
  
    --- Diff: python/pyspark/ml/param/_shared_params_code_gen.py ---
    @@ -105,64 +104,71 @@ def get$Name(self):
     if __name__ == "__main__":
         print(header)
         print("\n# DO NOT MODIFY THIS FILE! It was generated by 
_shared_params_code_gen.py.\n")
    -    print("from pyspark.ml.param import Param, Params\n\n")
    +    print("from pyspark.ml.param import *\n\n")
         shared = [
    -        ("maxIter", "max number of iterations (>= 0).", None, int),
    -        ("regParam", "regularization parameter (>= 0).", None, float),
    -        ("featuresCol", "features column name.", "'features'", str),
    -        ("labelCol", "label column name.", "'label'", str),
    -        ("predictionCol", "prediction column name.", "'prediction'", str),
    +        ("maxIter", "max number of iterations (>= 0).", None, 
"TypeConverters.convertToInt"),
    +        ("regParam", "regularization parameter (>= 0).", None, 
"TypeConverters.convertToFloat"),
    +        ("featuresCol", "features column name.", "'features'", None),
    --- End diff --
    
    This removes the check for the value being a string.  How about creating a 
TypeConverter for str which requires it be an instance of basestring, and then 
convert to str?


---
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