You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/07/18 19:20:50 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #25191: [SPARK-28440][MLLIB] Use TestingUtils to compare floating point values

dongjoon-hyun commented on a change in pull request #25191: [SPARK-28440][MLLIB] Use TestingUtils to compare floating point values
URL: https://github.com/apache/spark/pull/25191#discussion_r305076840
 
 

 ##########
 File path: mllib/src/test/scala/org/apache/spark/mllib/fpm/AssociationRulesSuite.scala
 ##########
 @@ -84,7 +85,7 @@ class AssociationRulesSuite extends SparkFunSuite with MLlibTestSparkContext {
        [1] 23
      */
     assert(results2.size === 30)
-    assert(results2.count(rule => math.abs(rule.confidence - 1.0D) < 1e-6) == 23)
+    assert(results2.count(rule => rule.confidence ~== 1.0D absTol 1e-6) == 23)
 
 Review comment:
   This seems to fail in Jenkins environment. Did it pass in your local environment, @eugen-prokhorenko ?
   ```
   sbt.ForkMain$ForkError: org.scalatest.exceptions.TestFailedException: Expected 0.6 and 1.0 to be within 1.0E-6 using absolute tolerance.
   	at org.apache.spark.mllib.util.TestingUtils$DoubleWithAlmostEquals.$tilde$eq$eq(TestingUtils.scala:80)
   	at org.apache.spark.mllib.fpm.AssociationRulesSuite.$anonfun$new$4(AssociationRulesSuite.scala:88)
   	at org.apache.spark.mllib.fpm.AssociationRulesSuite.$anonfun$new$4$adapted(AssociationRulesSuite.scala:88)
   ```
   
   Please make this PR pass the Jenkins.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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