jpmml / jpmml-lightgbm

Java library and command-line application for converting LightGBM models to PMML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

not support objective='quantile'

CuiZhengliang opened this issue · comments

i try use pmml API fit quantile lightgbm model, but not work.
as:

Standard output is empty
Standard error:
Dec 26, 2019 4:19:51 PM org.jpmml.sklearn.Main run
INFO: Parsing PKL..
Dec 26, 2019 4:19:51 PM org.jpmml.sklearn.Main run
INFO: Parsed PKL in 194 ms.
Dec 26, 2019 4:19:51 PM org.jpmml.sklearn.Main run
INFO: Converting..
Dec 26, 2019 4:19:51 PM org.jpmml.sklearn.Main run
SEVERE: Failed to convert
java.lang.IllegalArgumentException: quantile
        at org.jpmml.lightgbm.GBDT.loadObjectiveFunction(GBDT.java:521)
        at org.jpmml.lightgbm.GBDT.load(GBDT.java:105)
        at org.jpmml.lightgbm.LightGBMUtil.loadGBDT(LightGBMUtil.java:53)
        at lightgbm.sklearn.Booster.loadGBDT(Booster.java:54)
        at lightgbm.sklearn.Booster.getGBDT(Booster.java:42)
        at lightgbm.sklearn.BoosterUtil.getGBDT(BoosterUtil.java:68)
        at lightgbm.sklearn.BoosterUtil.getNumberOfFeatures(BoosterUtil.java:37)
        at lightgbm.sklearn.LGBMRegressor.getNumberOfFeatures(LGBMRegressor.java:34)
        at sklearn2pmml.pipeline.PMMLPipeline.encodePMML(PMMLPipeline.java:227)
        at org.jpmml.sklearn.Main.run(Main.java:145)
        at org.jpmml.sklearn.Main.main(Main.java:94)

Exception in thread "main" java.lang.IllegalArgumentException: quantile
        at org.jpmml.lightgbm.GBDT.loadObjectiveFunction(GBDT.java:521)
        at org.jpmml.lightgbm.GBDT.load(GBDT.java:105)
        at org.jpmml.lightgbm.LightGBMUtil.loadGBDT(LightGBMUtil.java:53)
        at lightgbm.sklearn.Booster.loadGBDT(Booster.java:54)
        at lightgbm.sklearn.Booster.getGBDT(Booster.java:42)
        at lightgbm.sklearn.BoosterUtil.getGBDT(BoosterUtil.java:68)
        at lightgbm.sklearn.BoosterUtil.getNumberOfFeatures(BoosterUtil.java:37)
        at lightgbm.sklearn.LGBMRegressor.getNumberOfFeatures(LGBMRegressor.java:34)
        at sklearn2pmml.pipeline.PMMLPipeline.encodePMML(PMMLPipeline.java:227)
        at org.jpmml.sklearn.Main.run(Main.java:145)
        at org.jpmml.sklearn.Main.main(Main.java:94)

Traceback (most recent call last):
  File "train.py", line 48, in <module>
    train(debug=True, boost_type='lgb', is_quantile=1, is_pmml=True)
  File "train.py", line 39, in train
    lgb_q.train_and_save(is_pmml=is_pmml)
  File "/home/jupyter/code/AdPutting/model.py", line 104, in train_and_save
    self.regressor.set_params(alpha=0.5)
  File "/home/jupyter/code/AdPutting/model.py", line 98, in __train_pmml
    pipeline.fit(self.train[self.feats], self.train['y'], regressor__categorical_feature=cat_indices)
  File "/home/jupyter/anaconda3/envs/py37/lib/python3.7/site-packages/sklearn2pmml/__init__.py", line 265, in sklearn2pmml
    raise RuntimeError("The JPMML-SkLearn conversion application has failed. The Java executable should have printed more information about the failure into its standard output and/or standard error streams")
RuntimeError: The JPMML-SkLearn conversion application has failed. The Java executable should have printed more information about the failure into its standard output and/or standard error streams