srowen commented on a change in pull request #25475:
[SPARK-28736][SPARK-28735][PYTHON][ML][TESTS] Fix PySpark ML tests to pass in
JDK 11
URL: https://github.com/apache/spark/pull/25475#discussion_r314782543
##########
File path: python/pyspark/ml/tests/test_algorithms.py
##########
@@ -86,7 +86,7 @@ def test_raw_and_probability_prediction(self):
expected_rawPrediction = [-11.6081922998, -8.15827998691, 22.17757045]
self.assertTrue(result.prediction, expected_prediction)
self.assertTrue(np.allclose(result.probability, expected_probability,
atol=1E-4))
- self.assertTrue(np.allclose(result.rawPrediction,
expected_rawPrediction, atol=1E-4))
+ self.assertTrue(np.allclose(result.rawPrediction,
expected_rawPrediction, atol=1))
Review comment:
I'm not sure where the difference comes from, but it could be subtle
differences in randomization or something across the JDKs. If these two tests
are the only ones that vary, I think we're OK. I agree with loosening the bound
here as these are log-odds, and I suspect the test values were picked just
because it's what some previous run spit out (that is, it's too specific)
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]