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

    https://github.com/apache/spark/pull/17078#discussion_r103239934
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
 ---
    @@ -1447,7 +1447,7 @@ private class LogisticAggregator(
           label: Double): Unit = {
     
         val localFeaturesStd = bcFeaturesStd.value
    -    val localCoefficients = bcCoefficients.value
    +    val localCoefficients = bcCoefficients.value.toArray
    --- End diff --
    
    Another thought is that by tagging the class member as `@transient lazy 
val` we are at least making this hidden problem more explicit. I think using 
the transient method makes it a bit less likely that someone will come along 
and make a change in the future that serializes the coefficients. I'll plan to 
update it here with the transient tag then.


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