-
Notifications
You must be signed in to change notification settings - Fork 98
Fix unicode issue #2747
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
base: main
Are you sure you want to change the base?
Fix unicode issue #2747
Conversation
Signed-off-by: Ganesan Ramalingam <[email protected]>
❌ 68 Tests Failed:
View the full list of 68 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
| try: | ||
| return s.decode("utf-8") | ||
| except UnicodeDecodeError: | ||
| return s.decode("latin1") # or "cp1252" or other fallback |
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.
I have seen cases where the string attributes iare used to store binary data (e.g. in the custom Tokenizer op, even though this is invalid onnx). Is this trying to address those cases? If so, I would simply preserve the b-string to avoid accidental modifications.
Related: onnx/ir-py#184
This copilot-suggested fix enabled converting a recent onnx model to onnxscript.