fix: Fixed a `raise` statement (#30275)
* Fixed a raise statement. * Minor changes.
This commit is contained in:
parent
c63f158903
commit
37b5946a66
|
@ -347,9 +347,11 @@ if __name__ == "__main__":
|
|||
if args.convert_preprocessor:
|
||||
try:
|
||||
if not _is_package_available("tiktoken"):
|
||||
raise """`tiktoken` is not installed, use `pip install tiktoken` to convert the tokenizer"""
|
||||
except Exception:
|
||||
pass
|
||||
raise ModuleNotFoundError(
|
||||
"""`tiktoken` is not installed, use `pip install tiktoken` to convert the tokenizer"""
|
||||
)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
else:
|
||||
from tiktoken.load import load_tiktoken_bpe
|
||||
|
||||
|
|
Loading…
Reference in New Issue