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

   ### What changes were proposed in this pull request?
   
   Add native `LinearSVC` and its fitted model so the Rust client can train a 
binary linear support vector classifier and predict on new rows. Training sends 
the dataset and parameters through `MlCommand.Fit`; prediction uses the 
returned cached model object reference.
   
   Expose typed Rust setters for all 13 constructor parameters and a Python 
binding under `pyspark.ml.connect.classification.LinearSVC` and 
`pyspark.ml.connect.LinearSVC`. Its keyword-only constructor follows the JVM 
PySpark estimator's parameter names and defaults; Python setters mutate and 
return the estimator.
   
   Share the existing LogisticRegression fit and cached-model handling, 
including malformed-response validation and session isolation. Add the native 
live tests to CI's explicit test list.
   
   ### Why are the changes needed?
   
   The Rust client currently has no LinearSVC estimator. This enables binary 
support vector classification through Spark Connect with regularization, 
instance weights and configurable decision thresholds.
   
   [SPARK-61077](https://issues.apache.org/jira/browse/SPARK-61077)
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Rust and Python callers can fit Spark's JVM LinearSVC with vector 
features and binary labels 0/1, then transform another DataFrame from the same 
session. Invalid training data and parameters fail during fitting. Cached 
models remain available until session closure so model clones and lazy 
prediction DataFrames remain valid.
   
   This addition exposes fitting and DataFrame transformation. 
Coefficient/intercept access, summaries, single-vector prediction and model 
persistence are outside this API addition; the compatibility documentation 
records these limits.
   
   ### How was this patch tested?
   
   - Added three live Rust tests covering learned binary predictions, distinct 
fits on reversed labels, all 13 parameter setters, default columns, zero-weight 
examples, threshold changes, model cloning/lazy execution, session isolation 
and invalid training data. All passed against Spark 4.3.0; all three 
LogisticRegression live regression tests passed too.
   - Added Python integration cases for constructor and mutating-setter usage. 
Both pass with the native binding and official JVM PySpark as reference; the 
native LogisticRegression regression case also passes. Verified all 13 
constructor names, defaults and keyword-only arguments against the reference.
   - Rust: 466 library tests passed; the complete run without a server passed 
702 tests, with 26 ignored (server-gated tests return early without 
SPARK_REMOTE). All integration targets compile with and without wasm-udf; 
formatting and library Clippy passed.
   - Python offline suite: 1,023 passed, 8 skipped. Method-name comparison 
across the 12 existing core wrapper classes found no gaps under the documented 
transport exclusions.
   - Workspace/all-target Clippy still fails on existing tests and Python 
bindings. Comparing diagnostics with the exact base commit found no new errors.
   - Official SQL Connect suite through the Rust transport: all 87 files passed 
(2,638 tests passed, 589 skipped), using the existing CI exclusions and 
known-failure manifest.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Codex (GPT-6)
   
   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