(paddlenlp_uie) lusiqi@lusiqideMacBook-Air python % python infer.py --model_dir ../../checkpoint/model_best --device cpu
/Users/lusiqi/anaconda3/envs/paddlenlp_uie/lib/python3.8/site-packages/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
/Users/lusiqi/anaconda3/envs/paddlenlp_uie/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits')
.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace
. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/Users/lusiqi/anaconda3/envs/paddlenlp_uie/lib/python3.8/site-packages/pkg_resources/init.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google')
.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace
. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/Users/lusiqi/anaconda3/envs/paddlenlp_uie/lib/python3.8/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
[2023-09-06 14:13:55,868] [ INFO] - Downloading tokenizer_config.json from https://bj.bcebos.com/paddlenlp/models/community/../../checkpoint/model_best/tokenizer_config.json
[2023-09-06 14:13:55,936] [ ERROR] - Downloading from https://bj.bcebos.com/paddlenlp/models/community/../../checkpoint/model_best/tokenizer_config.json failed with code 404!
Traceback (most recent call last):
File "/Users/lusiqi/anaconda3/envs/paddlenlp_uie/lib/python3.8/site-packages/paddlenlp/transformers/auto/tokenizer.py", line 340, in from_pretrained
resolved_vocab_file = get_path_from_url(community_config_path, cache_dir)
File "/Users/lusiqi/anaconda3/envs/paddlenlp_uie/lib/python3.8/site-packages/paddlenlp/utils/downloader.py", line 132, in get_path_from_url
fullpath = _download(url, root_dir, md5sum)
File "/Users/lusiqi/anaconda3/envs/paddlenlp_uie/lib/python3.8/site-packages/paddlenlp/utils/downloader.py", line 193, in _download
raise RuntimeError("Downloading from {} failed with code " "{}!".format(url, req.status_code))
RuntimeError: Downloading from https://bj.bcebos.com/paddlenlp/models/community/../../checkpoint/model_best/tokenizer_config.json failed with code 404!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "infer.py", line 530, in
uie = UIEPredictor(args)
File "infer.py", line 80, in init
self._tokenizer = AutoTokenizer.from_pretrained(args.model_dir, use_fast=args.use_fast)
File "/Users/lusiqi/anaconda3/envs/paddlenlp_uie/lib/python3.8/site-packages/paddlenlp/transformers/auto/tokenizer.py", line 343, in from_pretrained
raise RuntimeError(
RuntimeError: Can't load tokenizer for '../../checkpoint/model_best'.
Please make sure that '../../checkpoint/model_best' is:
(paddlenlp_uie) lusiqi@lusiqideMacBook-Air python %