This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 753e7c2 [SPARK-37522][PYTHON][TESTS] Fix
MultilayerPerceptronClassifierTest.test_raw_and_probability_prediction
753e7c2 is described below
commit 753e7c249e8ffe148b84ab9b9b85b79305dd6b13
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu Dec 2 10:30:19 2021 -0800
[SPARK-37522][PYTHON][TESTS] Fix
MultilayerPerceptronClassifierTest.test_raw_and_probability_prediction
This PR aims to update a PySpark unit test case by increasing the tolerance
by `10%` from `0.1` to `0.11`.
```
$ java -version
openjdk version "17.0.1" 2021-10-19 LTS
OpenJDK Runtime Environment Zulu17.30+15-CA (build 17.0.1+12-LTS)
OpenJDK 64-Bit Server VM Zulu17.30+15-CA (build 17.0.1+12-LTS, mixed mode,
sharing)
$ build/sbt test:package
$ python/run-tests --testname 'pyspark.ml.tests.test_algorithms
MultilayerPerceptronClassifierTest.test_raw_and_probability_prediction'
--python-executables=python3
...
======================================================================
FAIL: test_raw_and_probability_prediction
(pyspark.ml.tests.test_algorithms.MultilayerPerceptronClassifierTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/dongjoon/APACHE/spark-merge/python/pyspark/ml/tests/test_algorithms.py",
line 104, in test_raw_and_probability_prediction
self.assertTrue(np.allclose(result.rawPrediction,
expected_rawPrediction, rtol=0.102))
AssertionError: False is not true
----------------------------------------------------------------------
Ran 1 test in 7.385s
FAILED (failures=1)
```
No.
Manually on native AppleSilicon Java 17.
Closes #34784 from dongjoon-hyun/SPARK-37522.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit eec9fecf5e3c1d0631caed427d4d468f44f98de9)
Signed-off-by: Dongjoon Hyun <[email protected]>
---
python/pyspark/ml/tests/test_algorithms.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/pyspark/ml/tests/test_algorithms.py
b/python/pyspark/ml/tests/test_algorithms.py
index 35ce48b..aec9d51 100644
--- a/python/pyspark/ml/tests/test_algorithms.py
+++ b/python/pyspark/ml/tests/test_algorithms.py
@@ -86,7 +86,7 @@ class
MultilayerPerceptronClassifierTest(SparkSessionTestCase):
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, rtol=0.1))
+ self.assertTrue(np.allclose(result.rawPrediction,
expected_rawPrediction, rtol=0.11))
class OneVsRestTests(SparkSessionTestCase):
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]