Skip to content

Commit 9b88e1d

Browse files
fazlan-nazeemmengxr
authored andcommitted
[SPARK-11582][MLLIB] specifying pmml version attribute =4.2 in the root node of pmml model
The current pmml models generated do not specify the pmml version in its root node. This is a problem when using this pmml model in other tools because they expect the version attribute to be set explicitly. This fix adds the pmml version attribute to the generated pmml models and specifies its value as 4.2. Author: fazlan-nazeem <[email protected]> Closes #9558 from fazlan-nazeem/master.
1 parent d50a66c commit 9b88e1d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mllib/src/main/scala/org/apache/spark/mllib/pmml/export/PMMLModelExport.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ private[mllib] trait PMMLModelExport {
3232
@BeanProperty
3333
val pmml: PMML = new PMML
3434

35+
pmml.setVersion("4.2")
3536
setHeader(pmml)
3637

3738
private def setHeader(pmml: PMML): Unit = {

0 commit comments

Comments
 (0)