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

    https://github.com/apache/spark/pull/8395#discussion_r37788602
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.scala
 ---
    @@ -287,7 +282,7 @@ abstract class GeneralizedLinearAlgorithm[M <: 
GeneralizedLinearModel]
             if (useFeatureScaling) {
               input.map(lp => (lp.label, 
scaler.transform(lp.features))).cache()
             } else {
    -          input.map(lp => (lp.label, lp.features))
    +          input.map(lp => (lp.label, lp.features)).cache()
    --- End diff --
    
    I think this omission was intentional: If input is cached, then there's no 
real need to cache this tiny transform.  If you keep as is, then you can just 
check at the end to see if "data" is cached before trying to unpersist it.


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