Skip to content

Commit 8621b71

Browse files
committed
Read SP mododel file in bytes mode in tests
1 parent 8539524 commit 8621b71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorflow_text/python/ops/sentencepiece_tokenizer_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def setUp(self):
9898
super(SentencepieceTokenizerOpTest, self).setUp()
9999
sentencepiece_model_file = (
100100
'tensorflow_text/python/ops/test_data/test_oss_model.model')
101-
self.model = gfile.GFile(sentencepiece_model_file, 'r').read()
101+
self.model = gfile.GFile(sentencepiece_model_file, 'rb').read()
102102

103103
def testGetVocabSize(self):
104104
sp = SentencepieceTokenizer(self.model)

0 commit comments

Comments
 (0)