You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### What changes were proposed in this pull request?
This PR aims to upgrade `JPMML` from 1.4.8 to 1.7.1. The main changes from 1.4.8 to 1.7.1 are as follows:
1. Starting from version 1.5.0, `PMML` schema version has been updated from 4.3 to 4.4, the related commit is:
jpmml/jpmml-model@7d8607a
2. Starting from version 1.6.0, `Java XML Binding` has been upgraded to `Jakarta XML Binding`, the related commit is: jpmml/jpmml-model@d76de1c
After this PR, the exported PMML model schema version has been upgraded from 4.3(https://dmg.org/pmml/v4-3/GeneralStructure.html) to 4.4(https://dmg.org/pmml/v4-4-1/GeneralStructure.html).
### Why are the changes needed?
1. Upgrade the PMML standard to the latest 4.4 version ;
2. Upgrade `Java XML Binding` to `Jakarta XML Binding` by upgrade `JPMML`.
### Does this PR introduce _any_ user-facing change?
Yes, the exported PMML model version has been upgraded from 4.3 to 4.4, details are as follows:
1. `version` has been changed from 4.2 to 4.4;
2. `xmlns` has been changed from `http://www.dmg.org/PMML-4_3` to `http://www.dmg.org/PMML-4_4`;
3. `Application version` has been changed to the current Spark version.
Before:
```
<PMML version="4.2" xmlns="http://www.dmg.org/PMML-4_3" xmlns:data="http://jpmml.org/jpmml-model/InlineTable">
<Header description="k-means clustering">
<Application name="Apache Spark MLlib" version="3.5.4"/>
<Timestamp>2025-02-08T10:00:55</Timestamp>
</Header>
...
```
After:
```
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PMML version="4.4" xmlns="http://www.dmg.org/PMML-4_4" xmlns:data="http://jpmml.org/jpmml-model/InlineTable">
<Header description="k-means clustering">
<Application name="Apache Spark MLlib" version="4.1.0-SNAPSHOT"/>
<Timestamp>2025-02-08T11:34:40</Timestamp>
</Header>
...
```
**Despite this change, on the one hand, PMML version 4.4 was released as early as November 2019. On the other hand, the upgrade from 4.3 to 4.4 is backward compatible.(Reference: https://dmg.org/pmml/v4-4-1/Changes.html)**
### How was this patch tested?
1. Passed GA;
2. Manually checked the changes after the upgrade.
KMeans:
```
import org.apache.spark.ml.clustering.KMeans
val dataset = spark.read.format("libsvm").load("data/mllib/sample_kmeans_data.txt")
val kmeans = new KMeans().setK(2).setSeed(1L)
val model = kmeans.fit(dataset)
model.write.format("pmml").save("./kmeans")
```
LinearRegression:
```
import org.apache.spark.ml.regression.LinearRegression
val dataset = spark.read.format("libsvm").load("data/mllib/sample_linear_regression_data.txt")
val lr = new LinearRegression()
val model = lr.fit(dataset)
model.write.format("pmml").save("./lr")
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closesapache#49854 from wayneguow/pmml.
Authored-by: Wei Guo <[email protected]>
Signed-off-by: yangjie01 <[email protected]>
The PMML XML schema version of exported PMML format models by [PMML model export](mllib-pmml-model-export.html) has been upgraded from `PMML-4_3` to `PMML-4_4`.
0 commit comments