Skip to content

Commit 3ec1d35

Browse files
authored
fix tokenizer isfile checking code (#2424)
* fix tokenizer isfile checking code * fix code style
1 parent 75edf33 commit 3ec1d35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddlenlp/transformers/tokenizer_utils_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ def convert_added_tokens(obj):
16191619
# does include a vocab file path in it. However, if the vocab file
16201620
# path included in json does not exist, such as was deleted, to make
16211621
# it still work, use the vocab file under this dir.
1622-
elif not os.path.isfile(init_kwargs[args_name],
1622+
elif not os.path.isfile(init_kwargs[args_name] or
16231623
'') and os.path.isfile(file_path):
16241624
init_kwargs[args_name] = file_path
16251625
# TODO(guosheng): avoid reduplication of position args and key word args

0 commit comments

Comments
 (0)