zhengruifeng commented on a change in pull request #32673: URL: https://github.com/apache/spark/pull/32673#discussion_r641077227
########## File path: mllib/src/test/scala/org/apache/spark/ml/optim/aggregator/DifferentiableLossAggregatorSuite.scala ########## @@ -149,10 +152,43 @@ object DifferentiableLossAggregatorSuite { override def add(instance: Instance): TestAggregator = { val error = instance.label - BLAS.dot(coefficients, instance.features) - weightSum += instance.weight - lossSum += instance.weight * error * error / 2.0 - (0 until dim).foreach { j => - gradientSumArray(j) += instance.weight * error * instance.features(j) + val mathCls = Utils.classForName("java.lang.Math") Review comment: > An approximate equality test is appropriate here. I'm not sure why it varies in Java 11, but I could imagine tiny differences are possible. This is OK. +1 -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org