Hyukjin Kwon created SPARK-61325:
------------------------------------
Summary: Pin the Python hash seed of the official Connect test
runs so that the default pyspark.ml seeds are the same in every run
Key: SPARK-61325
URL: https://issues.apache.org/jira/browse/SPARK-61325
Project: Spark
Issue Type: Test
Components: Connect
Affects Versions: connect-rust-4.3.0
Reporter: Hyukjin Kwon
The official Connect test runs of scripts/run_official_tests.py (the "Connect
drop-in" and "Connect parity" CI jobs) run with a random Python hash seed. The
default seed of a pyspark.ml estimator is hash(type(self).__name__) (HasSeed),
so the random k-fold split of CrossValidator differs per run. In about 7% of
the runs (22 of 300 seeds: 19, 66, 97, ...), the official
test_crossvalidator_with_random_forest_classifier
(pyspark/ml/tests/connect/test_parity_tuning.py) trains a fold on label 0 only
and fails with "requirement failed: rawPredictionCol vectors must have
length=2, but got 1". The official 4.3.0 client fails the same way for the same
seeds, so this is the test's randomness, not a client bug. It failed the
drop-in job of master at 094f47b6
(https://github.com/apache/spark-connect-rust/actions/runs/42717540506).
Set PYTHONHASHSEED=0 for the test processes of run_official_tests.py, so that
the default seeds are the same in every run (the default seed of CrossValidator
is then -3087263388934076904, which passes on both clients).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]