This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new e86934b0787f [SPARK-46177][PYTHON][CONNECT][ML][TESTS] Skip 
'CrossValidatorTests.test_crossvalidator_with_fold_col' with Python 3.12
e86934b0787f is described below

commit e86934b0787f3b8dc49a25360a900daec6bae9de
Author: Hyukjin Kwon <gurwls...@apache.org>
AuthorDate: Thu Nov 30 13:41:00 2023 +0900

    [SPARK-46177][PYTHON][CONNECT][ML][TESTS] Skip 
'CrossValidatorTests.test_crossvalidator_with_fold_col' with Python 3.12
    
    ### What changes were proposed in this pull request?
    
    This PR proposes to skip doctest 
`CrossValidatorTests.test_crossvalidator_with_fold_col` with Python 3.12.
    
    ### Why are the changes needed?
    
    - For the proper test for Python 3.12. It is failing, see SPARK-46177 and 
https://github.com/apache/spark/actions/runs/7034467411/job/19154766502
    
    - Current dev torch version does not work very well with Python 3.12. It 
should be enabled together with SPARK-46078.
    
    - The build with Python 3.12 halts so can't see if other tests pass fine.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, dev-only.
    
    ### How was this patch tested?
    
    Manually tested.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #44086 from HyukjinKwon/SPARK-46177.
    
    Authored-by: Hyukjin Kwon <gurwls...@apache.org>
    Signed-off-by: Hyukjin Kwon <gurwls...@apache.org>
---
 python/pyspark/ml/tests/connect/test_legacy_mode_tuning.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/python/pyspark/ml/tests/connect/test_legacy_mode_tuning.py 
b/python/pyspark/ml/tests/connect/test_legacy_mode_tuning.py
index 63f31bb2ccdf..69e33a36d4f3 100644
--- a/python/pyspark/ml/tests/connect/test_legacy_mode_tuning.py
+++ b/python/pyspark/ml/tests/connect/test_legacy_mode_tuning.py
@@ -18,6 +18,7 @@
 
 import tempfile
 import unittest
+import sys
 
 import numpy as np
 
@@ -248,6 +249,9 @@ class CrossValidatorTestsMixin:
             np.testing.assert_allclose(cv_model.avgMetrics, 
loaded_cv_model.avgMetrics)
             np.testing.assert_allclose(cv_model.stdMetrics, 
loaded_cv_model.stdMetrics)
 
+    @unittest.skipIf(
+        sys.version_info > (3, 12), "SPARK-46078: Fails with dev torch with 
Python 3.12"
+    )
     def test_crossvalidator_with_fold_col(self):
         sk_dataset = load_breast_cancer()
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to