HyukjinKwon opened a new pull request, #675:
URL: https://github.com/apache/spark-connect-rust/pull/675
### What changes were proposed in this pull request?
The native classification models are being completed to the `pyspark.ml`
4.3.0 surface: typed accessors, summaries, single-vector predict and
persistence. Their tests compare with a golden captured from official PySpark
4.3.0, with the shared helper of #668. This PR adds the classification capture
and its golden:
- `scripts/capture_classification_models_golden.py`, the classification
tables for `scripts/ml_golden_common.py`:
- the datasets, in one partition, with fixed seeds and uids;
- the 14 estimator variants: LogisticRegression binomial and multinomial,
LinearSVC, DecisionTree, RandomForest binary and multiclass, GBT, NaiveBayes
multinomial, complement, bernoulli and gaussian, MultilayerPerceptron, FM, and
OneVsRest;
- the members and arguments of their models and summaries.
- `tests/golden/classification_models.json`: the fits and every value member
of the 21 model blocks, with the trees of the ensembles and OneVsRest's
submodels. That covers predict, predictRaw, predictProbability and predictLeaf
of dense and sparse vectors, evaluate, transform, repr and str.
- `tests/golden/classification_summaries.json`: every member of the 14
summary classes, the scalars and the DataFrames.
- `tests/golden/classification_persistence.json`: the save and load of the
estimators and models.
Each entry records the call, its value or error, and the ML commands and
results PySpark exchanged, with ids normalized per entry.
### Why are the changes needed?
The Rust and Python native classification PRs replay these requests offline
and compare their values live with official PySpark's.
### Does this PR introduce _any_ user-facing change?
No, test data only.
### How was this patch tested?
- Captured twice against a Spark 4.3.0 Connect server: the two runs are
byte-identical.
- The three files parse as strict JSON.
- The Rust family branches that read them pass their offline and live tests.
- ruff passes.
### 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]