Skip to content

Commit

Permalink
Read SP mododel file in bytes mode in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
broken committed Oct 9, 2020
1 parent 8539524 commit 8621b71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow_text/python/ops/sentencepiece_tokenizer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def setUp(self):
super(SentencepieceTokenizerOpTest, self).setUp()
sentencepiece_model_file = (
'tensorflow_text/python/ops/test_data/test_oss_model.model')
self.model = gfile.GFile(sentencepiece_model_file, 'r').read()
self.model = gfile.GFile(sentencepiece_model_file, 'rb').read()

def testGetVocabSize(self):
sp = SentencepieceTokenizer(self.model)
Expand Down

0 comments on commit 8621b71

Please sign in to comment.