PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12.13k stars 2.94k forks source link

[Bug]: There are no kernels which are registered in the strided_slice operator. #3289

Closed linonetwo closed 2 years ago

linonetwo commented 2 years ago

软件环境

paddle-bfloat      0.1.7
paddle2onnx        1.0.0
paddlefsl          1.1.0
paddlenlp          2.4.0
paddlepaddle       2.3.2
paddlepaddle-gpu   2.3.2.post112

重复问题

https://github.com/PaddlePaddle/Paddle/issues?q=There+are+no+kernels+which+are+registered+in

错误描述

python3.9/site-packages/paddlenlp/transformers/image_utils.py:213: DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead.
  resample=Image.BILINEAR,
python3.9/site-packages/paddlenlp/transformers/image_utils.py:379: DeprecationWarning: NEAREST is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.NEAREST or Dither.NONE instead.
  resample=Image.NEAREST,
python3.9/site-packages/paddlenlp/transformers/ernie_vil/feature_extraction.py:65: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
  resample=Image.BICUBIC,
python3.9/site-packages/paddlenlp/transformers/clip/feature_extraction.py:64: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
  resample=Image.BICUBIC,
running build
running build_ext
[2022-09-17 19:37:31,742] [ WARNING] - FasterTransformer is not available due to build errors.
error: [Errno 2] No such file or directory: 'cmake'
Compiling user custom op, it will cost a few seconds.....
INFO:     10.68.53.252:60982 - "POST /v1/engines/codegen/completions HTTP/1.1" 500 Internal Server Error

....

return self._getitem_index_not_tensor(item)
RuntimeError: (NotFound) There are no kernels which are registered in the strided_slice operator.
  [Hint: Expected kernels_iter != all_op_kernels.end(), but received kernels_iter == all_op_kernels.end().] (at /paddle/paddle/fluid/imperative/prepared_operator.cc:341)
  [operator < strided_slice > error]

稳定复现步骤 & 代码

https://github.com/PaddlePaddle/PaddleNLP/issues/3265 ,但这次在公司开发机上运行 https://bytedance.feishu.cn/docx/doxcnG8QhkQpAmjggvk0RpGv1Rh

linonetwo commented 2 years ago

看来是和 #3175 一样的问题,fastertransformer 需要 cmake 才行。

sudo apt-get install cmake 可解。

HuichuanLiu commented 2 years ago

cmake过程中还需要git pull,如果没有git依然会编译失败报这个error 另外python的requirements.txt缺regex 这些包开发环境下虽然常见,但是容器内很容易缺,建议补全依赖说明

#3228默认model为Salesforce/codegen-350M-mono,与README描述不符

gongel commented 2 years ago

@HuichuanLiu 感谢反馈,已提PR修复:https://github.com/PaddlePaddle/PaddleNLP/pull/3299

也欢迎提PR一起来完善~