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

dump_model giving "JSONDecodeError: Expecting ',' delimiter" for large (250mb+) models #5020

Open
nquinn1 opened this issue Feb 20, 2022 · 3 comments
Labels

Comments

@nquinn1
Copy link

nquinn1 commented Feb 20, 2022

Description

I have created a few large lgbm models (250mb+ when saved as txt) and when i run dump_model on them in Python it returns
"JSONDecodeError: Expecting ',' delimiter"

Reproducible example

import lightgbm as lgb

lgb_model = lgb.Booster(model_file = "VeryLargeModel.txt")
lgb.dump_model()

Environment info

python == 3.9.7
lightgbm == 3.3.2

Additional Comments

I have experienced the issue for several months and my other colleagues also get it. I'm not certain if it's a lightgbm issue or a json issue more generally. I've tried a few fixes from stack overflow on similar but not identical issues but nothing works. The models work completely fine, I use them daily and no issue when training etc.

@jameslamb jameslamb added the bug label Feb 20, 2022
@jameslamb
Copy link
Collaborator

Thanks very much for using LightGBM.

Can you please either provide the model file where you've observed this issue, or a sample code using publicly-available data (e.g. the datasets from sklearn.datasets) that reproduces this issue?

Without those specifics, it'll be difficult for maintainers here to work on this problem.

@nquinn1
Copy link
Author

nquinn1 commented Feb 21, 2022

Hi,

Thanks for the quick response. I have uploaded a 1GB ish model here https://github.com/nquinn1/LModel/blob/main/model_5.txt
made with random numbers as data. I have tested dump_model on it an get the same error.

@jameslamb
Copy link
Collaborator

Excellent, thanks for that! I or another maintainer will try to investigate the issue at some point, but I can't make any guarantees about how soon that will be.

Linking this related (although not identical) issue: #3858

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

No branches or pull requests

2 participants