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

    https://github.com/apache/spark/pull/929#discussion_r15533428
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala ---
    @@ -255,6 +260,9 @@ class ALS private (
               rank, lambda, alpha, YtY)
             previousProducts.unpersist()
             logInfo("Re-computing U given I (Iteration %d/%d)".format(iter, 
iterations))
    +        if (sc.checkpointDir.isDefined && (iter % 3 == 1)) {
    +          products.checkpoint()
    --- End diff --
    
    It may be unnecessary to checkpoint both RDDs in a single iteration. We can 
checkpoint products only, which is usually smaller than users:
    
    ~~~
    user -> product -> user -> product -> user -> product -> user -> product -> 
user -> product -> user -> product
                                                                           
check                                                                           
     check
    ~~~


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

Reply via email to