HyukjinKwon opened a new pull request, #745: URL: https://github.com/apache/spark-connect-rust/pull/745
### What changes were proposed in this pull request? This PR documents, in `docs/compatibility.md`, how the native ML classes behave on a Spark Connect session that is not the active one, for example a second session of `SparkSession.builder.remote(...).create()`. Here a fit, its training summary and the members of its model (`predict`, the summary's DataFrames) are sent over the session of the dataset and of the model, so they work on such a session. PySpark sends the summary of a fit and the members of a model (`_call_java`) over `SparkSession.getActiveSession()`. So on such a session, its fits of a model with a summary and its models' members fail with `CONNECT_ML.CACHE_INVALID` (`Cannot retrieve Summary object ... from the ML cache`). A model used from a session other than its own fails on both. ### Why are the changes needed? The parity review of the native ML classes found this difference from PySpark 4.3.0. It is kept on purpose: mirroring it would only make valid programs fail, and no program that runs on PySpark behaves differently here. The difference should be documented. ### Does this PR introduce _any_ user-facing change? No, documentation only. ### How was this patch tested? The behavior was checked with probes on both clients against a Spark 4.3.0 Connect server: a KMeans fit, its `predict` and its summary's predictions on a second session (fits and members fail with `CONNECT_ML.CACHE_INVALID` on PySpark and succeed here), and a model used from another session (fails on both). ### 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]
