-
Notifications
You must be signed in to change notification settings - Fork 100
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
ValueError: invalid literal for int() with base 10 when trying to dump model #18
Comments
@travisbrady Thanks for reporting the bug. Would you be able to run the following diagnostic script? lgb_txt_fn = 'models/brr_v1.1.0a6.lgb.txt'
tl = treelite.Model.load(lgb_txt_fn, model_format='lightgbm')
tl.compile(dirpath='./model_dump', params={}, verbose=True)
treelite.create_shared(toolchain='clang', dirpath='./model_dump', verbose=True) This should create a directory named |
Thanks, @hcho3 . I get the same error ( But the
All of the other retcode files are empty. |
I will try to re-produce the error on my end. Thanks! |
So far I was unable to re-produce the issue on my Macbook Pro. Can you run echo $SHELL to see which shell you are using? Also, do you see the same issue arising on another machine (e.g. Linux)? |
Another question: are you using the package from PyPI ( |
Just got the same error, glad you guys are already on this :) OS:
Python:
Compiler:
@hcho3 That diagnostic script also produced the same error for me. All of the resulting retcode files are empty except retcode_cpu0.txt contains:
I'm using
And I did install using |
Also, oddly if I try to compile
It compiles just fine |
This is interesting: I was able to reproduce the same error by setting SHELL to
and ran the diagnostic script. I will have to modify the logic in |
@hcho3 Ah interesting. Yes, when I switch to bash it works fine. Well, that works as a quick fix for now. Will stay tuned for zsh patch, thanks! |
Addresses issue #18. Diagnosis: The command `> log.txt` is intended to create an empty log named `log.txt`. This command behaves differently for some shells such as `zsh`. In `zsh`, the command is interpreted as `cat > log.txt`. (See https://stackoverflow.com/a/15546937 for more details.) Fix: Use `: > log.txt` to reliably create an empty log.
@AndrewHannigan @travisbrady The latest commit should fix the issue for |
Ahh ok, I am indeed a |
I'm encountering the following error when trying to dump a model using Python 3.6.5 running on Mac OS C.
Error:
Script to dump model:
OS Details:
Python details:
Compiler:
The text was updated successfully, but these errors were encountered: