HyukjinKwon opened a new pull request, #750: URL: https://github.com/apache/spark-connect-rust/pull/750
### What changes were proposed in this pull request? A native ML writer (the `MLWriter` that `write()` of an estimator, a model or an evaluator of `pyspark.ml.connect` returns) took the params of its object at `write()`. PySpark's `RemoteMLWriter.save` reads the params of its `_instance` at the save. The native writer now holds its object, exposed as PySpark's `_instance`. Its `save` reads the object's params then, from the writer of its native class after the object's param maps are synced (`_native_classes._native_writer`). A writer of PySpark's Python format (a Pipeline, a validator) syncs its object at the save too. ### Why are the changes needed? So that `w = lr.write(); lr.setMaxIter(7); w.save(path)` saves `maxIter=7`, as PySpark does. This client saved the old value. ### Does this PR introduce _any_ user-facing change? Yes: a param set after `write()` is saved, and the writer has PySpark's `_instance`. ### How was this patch tested? A new e2e test in `test_ml_api_e2e.py`: - a LogisticRegression whose `maxIter` is set after `write()`; - a Pipeline whose stage's threshold is set after `write()`; - `_instance` of both. The LogisticRegression case saved 3 before this change and saves 7 now, as official PySpark 4.3.0 does (a probe on both clients). ### 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]
