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

Loading pandas categorical breaks when a name contains square bracket character "]" #24

Closed
pmjpawelec opened this issue Jun 25, 2019 · 3 comments
Labels

Comments

@pmjpawelec
Copy link

The code doesn't differentiate between syntax "]" and name "]" and throws:

Exception in thread "main" java.lang.IllegalArgumentException: ...
at org.jpmml.lightgbm.GBDT.loadPandasCategorical(GBDT.java:460)
...

presumably in the second iteration of the while loop.

@77QingLiu
Copy link

+1

@vruusmann
Copy link
Member

Blocked by microsoft/LightGBM#1201, which has been superseded by microsoft/LightGBM#960

TLDR: I'm not going to develop a full-blown JavaCC grammar/parser for dealing with complex feature names, because the LightGBM team is about to change this part of LightGBM model files in a major way.

But feel free to "pressurize" the LightGBM team to work on microsoft/LightGBM#960 by upvoting it.

@pmjpawelec
Copy link
Author

@vruusmann this is understandable. I would add the information to the error message in line 460 though - asking to drop the "]" from names. It might save a lot of time for some people.

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

3 participants