jpmml/jpmml-lightgbm

Exception in thread "main" java.lang.IllegalArgumentException: Right branch is not selectable

ruzbeh opened this issue · 2 comments

Hey,

Can someone help with this

command run java -jar jpmml-lightgbm-executable-1.2.jar --lgbm-input lightgbm_2021092012 --pmml-output test.pmml


Exception in thread "main" java.lang.IllegalArgumentException: Right branch is not selectable
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:210)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:236)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:235)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:236)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:236)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:236)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:236)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:236)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:236)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:236)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:235)
	at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:235)
	at org.jpmml.lightgbm.Tree.encodeTreeModel(Tree.java:96)
	at org.jpmml.lightgbm.ObjectiveFunction.createMiningModel(ObjectiveFunction.java:72)
	at org.jpmml.lightgbm.BinomialLogisticRegression.encodeMiningModel(BinomialLogisticRegression.java:47)
	at org.jpmml.lightgbm.GBDT.encodeMiningModel(GBDT.java:394)
	at org.jpmml.lightgbm.GBDT.encodePMML(GBDT.java:383)
	at org.jpmml.lightgbm.Main.run(Main.java:132)
	at org.jpmml.lightgbm.Main.main(Main.java:118)

getting this error abruptly

lightGBM version: 3.1.0
jpmml version: 1.2

on updating jpmml to latest version i.e: 1.3.11

getting this error


Sep 20, 2021 11:37:02 PM org.jpmml.lightgbm.Main run
INFO: Loading GBDT..
Sep 20, 2021 11:37:03 PM org.jpmml.lightgbm.Main run
INFO: Loaded GBDT in 485 ms.
Sep 20, 2021 11:37:03 PM org.jpmml.lightgbm.Main run
INFO: Converting GBDT to PMML..
Sep 20, 2021 11:37:03 PM org.jpmml.lightgbm.Main run
SEVERE: Failed to convert GBDT to PMML
java.lang.IllegalArgumentException: Expected all values to be of the same data type, got 2 different data types ([integer, string])
	at org.jpmml.converter.TypeUtil.getDataType(TypeUtil.java:129)
	at org.jpmml.converter.TypeUtil.getDataType(TypeUtil.java:85)
	at org.jpmml.lightgbm.GBDT.encodeSchema(GBDT.java:233)
	at org.jpmml.lightgbm.GBDT.encodePMML(GBDT.java:384)
	at org.jpmml.lightgbm.Main.run(Main.java:158)
	at org.jpmml.lightgbm.Main.main(Main.java:127)

Exception in thread "main" java.lang.IllegalArgumentException: Expected all values to be of the same data type, got 2 different data types ([integer, string])
	at org.jpmml.converter.TypeUtil.getDataType(TypeUtil.java:129)
	at org.jpmml.converter.TypeUtil.getDataType(TypeUtil.java:85)
	at org.jpmml.lightgbm.GBDT.encodeSchema(GBDT.java:233)
	at org.jpmml.lightgbm.GBDT.encodePMML(GBDT.java:384)
	at org.jpmml.lightgbm.Main.run(Main.java:158)
	at org.jpmml.lightgbm.Main.main(Main.java:127)

Closing as exact duplicate of #52

The same issue does not need to be reported multiple times, on multiple projects. This is spamming.

really sorry it got mixed up.