This repository was archived by the owner on Mar 19, 2024. It is now read-only.
Fix test_supervised_util_test for python3#1152
Open
reidhayes wants to merge 1 commit intofacebookresearch:mainfrom
Open
Fix test_supervised_util_test for python3#1152reidhayes wants to merge 1 commit intofacebookresearch:mainfrom
reidhayes wants to merge 1 commit intofacebookresearch:mainfrom
Conversation
Fixes errors like this testing in python3:
```
======================================================================
ERROR: test_supervised_util_test_0 (fasttext.tests.test_script.TestFastTextUnitPy)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/work/003c13a04323e5dc26c2c02cd9c8df29e6c6/google3/runfiles/google3/third_party/py/fasttext/tests/test_script.py", line 590, in test
"gen_" + test_name)(self, copy.deepcopy(kwargs))
File "/build/work/003c13a04323e5dc26c2c02cd9c8df29e6c6/google3/runfiles/google3/third_party/py/fasttext/tests/test_script.py", line 229, in gen_test_supervised_util_test
check(get_random_data(100, min_words_line=2))
File "/build/work/003c13a04323e5dc26c2c02cd9c8df29e6c6/google3/runfiles/google3/third_party/py/fasttext/tests/test_script.py", line 210, in check
for line in fid:
File "<embedded stdlib>/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc7 in position 9: ordinal not in range(128)
```
Contributor
|
Hi @reidhayes! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. If you have received this in error or have any questions, please contact us at cla@fb.com. 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes this error in the unit-tests when running with python3: