HyukjinKwon opened a new pull request, #721:
URL: https://github.com/apache/spark-connect-rust/pull/721

   ### What changes were proposed in this pull request?
   
   A new live test file for phase 2 of the native ML class hierarchy 
(SPARK-61737), `python/tests/test_ml_regression_clustering_classes_e2e.py`, of 
the regression and clustering classes. Official PySpark runs it too, as the 
reference (`_native_classes.native_class`).
   
   - **Every object that the native classes make in Rust is of its public 
class** of `pyspark.ml.connect` (`type(x) is <public class>`), for the 8 
regression and 4 clustering estimators:
     - their fits, fits of param maps, `fitMultiple`, the loads of every 
estimator and model, and copies;
     - the training and evaluate summaries of LinearRegression and GLR, and the 
KMeans, BisectingKMeans and GaussianMixture summaries;
     - LDA's fits of both optimizers, `toLocal` and `isinstance` of `LDAModel`;
     - the trees of the random forest and gradient-boosted regressors, fitted 
and loaded;
     - PowerIterationClustering's load and copy.
   - **The vendored `pyspark.ml.Pipeline`, `CrossValidator` and 
`TrainValidationSplit`** fit, save and load native stages. Their loaders make 
PySpark's class of each stage's JVM class (`DefaultParamsReader`), as official 
PySpark's do. The test checks that class, the uids and the transform of the 
loaded model.
   
   The file is added to the live test list of `build_python_connect.yml`.
   
   ### Why are the changes needed?
   
   So that the class hierarchy of SPARK-61737 holds of the objects that Rust 
makes, not only of the classes, and so that PySpark's own meta-algorithms take 
the native stages. Before SPARK-61737, the vendored Pipeline and validators 
could not save native stages (`... is not MLWritable`).
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, test-only.
   
   ### How was this patch tested?
   
   Against a Spark 4.3.0 Connect server: 19 passed on ours (master 1a18a429) 
and 19 passed on official `pyspark-client` 4.3.0. Before SPARK-61737, 16 of 
them passed on ours: the saves of the vendored Pipeline and validators failed.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5.5
   
   This pull request and its description were written by Isaac.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to