spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srowen <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-5656] Fail gracefully for large values ...
Date Sat, 07 Feb 2015 13:29:28 GMT
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4433#discussion_r24289433
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/linalg/EigenValueDecomposition.scala
---
    @@ -79,6 +79,11 @@ private[mllib] object EigenValueDecomposition {
         // Mode 1: A*x = lambda*x, A symmetric
         iparam(6) = 1
     
    +    require(n * ncv.toLong <= Integer.MAX_VALUE, "Large n and/or k will exceed " +
    --- End diff --
    
    I don't mean to belabor this, but the new second error message implies that k alone is
the problem, and that k exceeds 2^31-1, and those aren't necessarily true. Concretely I'm
suggesting something simple like
    
    ```
    require(n * ncv.toLong <= Integer.MAX_VALUE && ncv * (ncv.toLong + 8) <=
Integer.MAX_VALUE, 
            s"k = $k and/or n = $n are too large to compute an eigendecomposition")
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message