Properly handle unicode_errors arg parameter when loading a vocab file#2570
Merged
Conversation
Collaborator
|
Looks good, can you please add some tests? The tests should fail without your changes, and pass when your changes are active. |
Contributor
Author
|
Thank you for checking that. I'll do that. Please give me a moment. |
Contributor
Author
|
I've changed the way to take care of fvocab, which is same as model file is doing. |
piskvorky
reviewed
Aug 22, 2019
wmtzk
commented
Aug 22, 2019
Contributor
Author
wmtzk
left a comment
There was a problem hiding this comment.
I've reverted except "add unicode_errors arg" and confirmed the test codes work.
Collaborator
|
Your tests fail under Py2.7, can you please take a look? |
Contributor
Author
|
Mmm, It's embarrassing to be mentioned such a thing. ^^; I've confirmed the tests passed on Python2.7.15 and 3.7.3 env. |
Collaborator
|
OK, looks good to merge. Congrats on your first contribution, @wmtzk ! 🥇 Good work! |
Contributor
Author
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #2569
Simply, added "unicode_errors" option on loading vocab file process.
I've tested and all of them passed with changing numpy version from 1.14.5 to 1.17.0 in tox.ini.
The reason I've changed the version of numpy is to avoid the follwoing error, which also happens the HEAD revision of f97d0e7
Versions
Ubuntu 18.04
Thank you for checking that and your consideration!