Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with lgb's continue training model file #26

Open
buaanie opened this issue Sep 18, 2019 · 1 comment
Open

error with lgb's continue training model file #26

buaanie opened this issue Sep 18, 2019 · 1 comment

Comments

@buaanie
Copy link

buaanie commented Sep 18, 2019

here is my training code:

gbm = lgb.train(params,
                lgb_valid,
                num_boost_round=5,
                evals_result=result,
                init_model = old_model,
                verbose_eval=5,
                learning_rates=lambda iter: 0.05 * (0.99 ** iter),
                valid_sets=lgb_valid,
                feature_name=list(old_feats)#,categorical_feature = cates
               )
gbm.save_model('lgb_continue.txt')

When i try to convert the "lgb_continue.txt" to pmml, something goes wrong:

Exception in thread "main" java.lang.NullPointerException
        at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:223)
        ...
        at org.jpmml.lightgbm.Tree.encodeNode(Tree.java:236)
        at org.jpmml.lightgbm.Tree.encodeTreeModel(Tree.java:96)
        at org.jpmml.lightgbm.ObjectiveFunction.createMiningModel(ObjectiveFunction.java:66)
        at org.jpmml.lightgbm.BinomialLogisticRegression.encodeMiningModel(BinomialLogisticRegression.java:47)
        at org.jpmml.lightgbm.GBDT.encodeMiningModel(GBDT.java:298)
        at org.jpmml.lightgbm.GBDT.encodePMML(GBDT.java:287)
        at org.jpmml.lightgbm.Main.run(Main.java:131)
        at org.jpmml.lightgbm.Main.main(Main.java:117)

If I don't use continue training , everything will be fine.

@purplenigma
Copy link

purplenigma commented Aug 3, 2022

@vruusmann I have the same problem with version 1.4.3,here is my txt file:
PROD_LGBM_1659430603.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants