运行python bert_example.py报错
大家好, 我在hugging face上面下载了bert-base-uncased模型来测试bert_example.py脚本,操作完全按照TurboTransformers/example/python/README.md这个里面来操作,不过因为本地编译有问题,所以我这里用的是作者提供的编译好的镜像(docker pull thufeifeibear/turbo_transformers_cpu:latest),结果报以下错误:
Traceback (most recent call last):
File "
请问有大佬遇到过类似问题吗,非常感谢各位的答复。
你在镜像里编译一下最新代码吧,你用的example代码是最新的,镜像里的代码不一定是。 你现在用turbo做backend,却用onnxrt的方式调用
https://github.com/Tencent/TurboTransformers/blob/f43f35b792/example/python/bert_example.py#L65
@feifeibear 您好,涉及到编译又会回到我在另一个issue里面遇到的问题,编译CPU版本一直会有报错,不知道该怎么解决呢
https://github.com/Tencent/TurboTransformers/issues/238
你要不直接用我提供的镜像试试? FROM thufeifeibear/turbo_transformers_cpu:latest 在这个镜像里编译
你如果要自己从头开始编译,自己在container里看一下conda install哪个具体的包出问题,然后更改一下。
好的,在你的镜像里编译是没问题的,谢谢