#19 PyPi 的文件缺少 onnx_inference 模块

Closed
created 1 year ago by rickyzhu · 4 comments
rickyzhu commented 1 year ago
PyPi的文件(https://pypi.org/project/pcl-pangu/#files)缺少onnx_inference 模块 ,从PyPi安装pcl_pangu会报ImportError ``` In [1]: from pcl_pangu.context import set_context In [2]: ...: from pcl_pangu.model import alpha In [3]: set_context(backend='cpu') In [4]: config = alpha.model_config_cpu(model='2B6', load='big-models/onnx_int8_pangu_alpha_2b6') In [5]: alpha.inference(config,input='四川的省会是?') --------------------------- inference config -------------------------- > Base Model: [alpha] > Model Size: [2B6] > global batch_size: 1 > generate_max_tokens length: 128 ---------------------------- end of config ---------------------------- --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-5-bb5a0813f1fa> in <module> ----> 1 alpha.inference(config,input='四川的省会是?') D:\softwares\Anaconda3\envs\plm2kg\lib\site-packages\pcl_pangu\model\alpha\alpha.py in inference(config, top_k, top_p, input, input_file, generate_max_tokens, output_file, oneCardInference) 95 96 elif check_context() == 'cpu': ---> 97 from pcl_pangu.onnx_inference.infer import onnx_generate 98 from pcl_pangu.tokenizer.tokenization_jieba import get_tokenizer 99 ModuleNotFoundError: No module named 'pcl_pangu.onnx_inference' ```
imyzx commented 1 year ago
Owner
谢谢反馈!问题已修复,请重新pip安装package,最新版本为1.2.2.1
rickyzhu commented 1 year ago
Poster
> 谢谢反馈!问题已修复,请重新pip安装package,最新版本为1.2.2.1 确认已经解决,起码再Ubuntu环境能成功安装所有模块。但安装过程并没有安装所有依赖,比如`requests`,`onnxruntime`,需要不断通过报错提示手动安装。虽然问题不大,但还是会伤害体验。
imyzx commented 1 year ago
Owner
收到,谢谢反馈,我们将更新到下个小版本whl当中,添加package依赖!届时通知您
ZezhengZ commented 1 year ago
真好啊真好啊
rickyzhu closed this issue 9 months ago
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.