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

    https://github.com/apache/spark/pull/9565#discussion_r58844750
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/Transformer.scala ---
    @@ -90,7 +90,7 @@ abstract class UnaryTransformer[IN, OUT, T <: 
UnaryTransformer[IN, OUT, T]]
        * account of the embedded param map. So the param values should be 
determined solely by the input
        * param map.
        */
    -  protected def createTransformFunc: IN => OUT
    +  protected val createTransformFunc: (T, IN) => OUT
    --- End diff --
    
    The UDF obtained with `def createTransformFunc` can't work with runtime 
mirror. I tried many times. Only make it as a `val` can work.
    
    As `Transformer` can update its params, we need to pass in `T` to UDF to 
get the updated params.


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

Reply via email to