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

Fix OpTester from incorrectly converting uint8 data to utf-8 string #24854

Merged

Conversation

Sand3r-
Copy link
Contributor

@Sand3r- Sand3r- commented Jun 2, 2020

PR types: Bug fixes

PR changes: APIs

Describe: When uint8 datatype is to be outputted in the message by _compare_expect_and_actual_outputs, direct cast using str(), causes to throw an error related to encoding (data is incorrectly treated as array of characters instead of array of numbers). To mitigate this, the data is cast to np.array which then can be safely cast to string.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 2, 2020

Thanks for your contribution!
Please adding test = develop in your commit message to trigger CI to ensure your's PR can be merged.
See Paddle CI Manual for details.

@luotao1
Copy link
Contributor

luotao1 commented Jun 3, 2020

Please trigger the CI

@Sand3r- Sand3r- force-pushed the mgallus/fix-optest-uint8-print branch from 96d227e to 14e7005 Compare June 3, 2020 14:37
@Sand3r-
Copy link
Contributor Author

Sand3r- commented Jun 7, 2020

@luotao1 All CIs have passed

@lidanqing-intel
Copy link
Contributor

@luotao1 Could this PR be merged ?

Copy link
Contributor

@jczaja jczaja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit 570b738 into PaddlePaddle:develop Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants