Paddle 上传文件时报错

dldeef67  于 5个月前  发布在  其他
关注(0)|答案(2)|浏览(52)

bug描述 Describe the Bug

File "/data/mlops/Open-Assistant/inference/server/oasst_inference_server/plugins/vectors_db/loaders/data_loader.py", line 383, in path_to_doc1
res = file_to_doc(file, base_path=None, verbose=verbose, fail_any_exception=fail_any_exception,
File "/data/mlops/Open-Assistant/inference/server/oasst_inference_server/plugins/vectors_db/loaders/data_loader.py", line 305, in file_to_doc
doc1 = UnstructuredPaddlePDFLoader(file_path=file).load()
File "/data/miniconda/envs/oassistant/lib/python3.10/site-packages/langchain/document_loaders/unstructured.py", line 71, in load
elements = self._get_elements()
File "/data/mlops/Open-Assistant/inference/server/oasst_inference_server/plugins/vectors_db/loaders/pdf_loader.py", line 277, in _get_elements
txt_file_path = pdf_ocr_txt(self.file_path)
File "/data/mlops/Open-Assistant/inference/server/oasst_inference_server/plugins/vectors_db/loaders/pdf_loader.py", line 257, in pdf_ocr_txt
result = self.ocr.ocr(img_name)
File "/data/miniconda/envs/oassistant/lib/python3.10/site-packages/paddleocr/paddleocr.py", line 645, in ocr
dt_boxes, rec_res, _ = self.call(img, cls)
File "/data/miniconda/envs/oassistant/lib/python3.10/site-packages/paddleocr/tools/infer/predict_system.py", line 89, in call
img_crop_list, angle_list, elapse = self.text_classifier(
File "/data/miniconda/envs/oassistant/lib/python3.10/site-packages/paddleocr/tools/infer/predict_cls.py", line 112, in call
prob_out = self.output_tensors[0].copy_to_cpu()
RuntimeError:

C++ Traceback (most recent call last):

0 void paddle_infer::Tensor::CopyToCpuImpl(float*, void*, void ()(void), void*) const
1 float* phi::DenseTensor::data()
2 phi::DenseTensor::data()
3 phi::DenseTensor::check_memory_size() const
4 phi::enforce::EnforceNotMet::EnforceNotMet(phi::ErrorSummary const&, char const*, int)
5 phi::enforce::GetCurrentTraceBackString abi:cxx11

Error Message Summary:

PreconditionNotMetError: Tensor holds no memory. Call Tensor::mutable_data firstly.
[Hint: holder_ should not be null.] (at ../paddle/phi/core/dense_tensor_impl.cc:44)

其他补充信息 Additional Supplementary Information

padd 版本: python3 -m pip install paddlepaddle-gpu==2.5.1.post116 -f https://www.paddlepaddle.org.cn/whl/linux/cudnnin/stable.html

pkmbmrz7

pkmbmrz71#

NVIDIA-SMI 510.60.02 Driver Version: 510.60.02 CUDA Version: 11.6

wqlqzqxt

wqlqzqxt2#

这看上去是paddleocr的问题,请在paddleocr下面提issue哈

相关问题