-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Fix: AttributeError in str_escape when handling numpy.int64 in sklearn.tree._export.py in /sklearn/tree/_export.py #31036
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
Conversation
8c952ea to
5a7a615
Compare
5a7a615 to
d595a59
Compare
|
Hello I noticed that the changelog check is failing, and I wanted to confirm whether a changelog entry is required for this PR or if it can be bypassed. Please let me know how you'd like me to proceed. Thanks for your time! |
adrinjalali
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @OmarManzoor this should be a quick review.
OmarManzoor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @guilhermecsnpeixoto
This PR updates export_graphviz to raise a ValueError when receiving non-string feature names, such as numpy.int64, instead of causing an AttributeError. This follows the suggestion in issue #30834, ensuring clearer error handling and guidance for users.
Reference Issues/PRs
Fixes #30834
What does this implement/fix? Explain your changes.
Implemented parameter verification, raising valueError for invalid inputs as suggested in the respective issue.
Any other comments?
No.