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

Update XGBoost.py #423

Merged
merged 4 commits into from
Jan 6, 2021
Merged

Update XGBoost.py #423

merged 4 commits into from
Jan 6, 2021

Conversation

clhne
Copy link
Contributor

@clhne clhne commented Sep 27, 2020

When the type of feature_id is float there throw an error:
"ValueError: invalid literal for int() with base 10:"
Because you get a ValueError if you pass a string representation of a float into int, or a string representation of anything but an integer (including empty string). If you do want to pass a string representation of a float to an int, as it points out above, you can convert to a float first, then to an integer.
Ref: https://stackoverflow.com/questions/1841565/valueerror-invalid-literal-for-int-with-base-10

@CLAassistant
Copy link

CLAassistant commented Sep 27, 2020

CLA assistant check
All committers have signed the CLA.

When the type of feature_id is float there throw an error:
"ValueError: invalid literal for int() with base 10:"
Because you get a ValueError if you pass a string representation of a float into int, or a string representation of anything but an integer (including empty string). If you do want to pass a string representation of a float to an int, as it points out above, you can convert to a float first, then to an integer.
Ref: https://stackoverflow.com/questions/1841565/valueerror-invalid-literal-for-int-with-base-10

Signed-off-by: clc <clc.test.com>
@clhne
Copy link
Contributor Author

clhne commented Sep 28, 2020

@xadupre @wenbingl @sdpython @prabhat00155 @msteijaert
Please review, thanks.

@wenbingl wenbingl merged commit fdbd2b4 into onnx:master Jan 6, 2021
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

Successfully merging this pull request may close these issues.

4 participants