multimodal-art-projection / MAP-NEO

877 stars 81 forks source link

fastdeploy-gpu-python install problem #10

Open skyroot opened 6 months ago

skyroot commented 6 months ago

when run "python multi_thread_process_to_doc.py ./pdf --process-num 8",account a ERROR: Due to the package size limitation, we have not provide fastdeploy-gpu-python on pypi yet, please execute the following commands to reinstall fastdeploy-gpu-python。let me uninstall l fastdeploy-gpu-python,then pip install fastdeploy-gpu-python -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html,but after these two command, python multi_thread_process_to_doc.py ./pdf --process-num 8 problem is still appear...

AlanYan2023 commented 6 months ago

Yes! I have the same problem! "D:\Program Files\MAP-NEO-main\Matrix\document-convert>python multi_thread_process_to_doc.py D:\翻译测试\test.pdf --process-num 8 WARNING:root:Due to the package size limitation, we have not provide fastdeploy-gpu-python on pypi yet, please execute the following commands to reinstall fastdeploy-gpu-python. WARNING:root: =================== Reinstall fastdeploy-gpu-python commands ================== WARNING:root: python -m pip uninstall fastdeploy-gpu-python WARNING:root: python -m pip install fastdeploy-gpu-python -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html Traceback (most recent call last): File "D:\Program Files\MAP-NEO-main\Matrix\document-convert\multi_thread_process_to_doc.py", line 4, in import fastdeploy as fd File "C:\Users\Alan1\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastdeploy__init__.py", line 22, in raise Exception("Failed to import fastdeploy module.") Exception: Failed to import fastdeploy module."

skyroot commented 6 months ago

which your python version?

skyroot commented 6 months ago

python multi_thread_process_to_doc.py pdf --process-num 6
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt

can run,but can't use GPU rescource?!

AlanYan2023 commented 6 months ago

which your python version?

Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32

skyroot commented 6 months ago

which your python version?

Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32

it should use 《python=3.10,fastdeploy support python version

AlanYan2023 commented 6 months ago

I changed my python version to 10.0 and reinstalled fastdeploy, but the feedback is as follows.

D:\Program Files\MAP-NEO-main\Matrix\document-convert>python multi_thread_process_to_doc.py D:\翻译测试\test.pdf --process-num 8 Traceback (most recent call last): File "D:\Program Files\MAP-NEO-main\Matrix\document-convert\multi_thread_process_to_doc.py", line 4, in import fastdeploy as fd File "C:\Users\Alan1\AppData\Local\Programs\Python\Python310\lib\site-packages\fastdeploy__init.py", line 1, in from . import main File "C:\Users\Alan1\AppData\Local\Programs\Python\Python310\lib\site-packages\fastdeploy\main__.py", line 1, in import resource ModuleNotFoundError: No module named 'resource'

tslyellow commented 4 months ago

Has this happened to you guys? If so, can you tell me how to fix it? Thanks for the help!

(neo) λ f338777298ab ~/Code/MAP-NEO/document-convert python multi_thread_process_to_doc.py <docs/pdf/1.pdf> --process-num 8 ERROR:albumentations.check_version:Error fetching version info Traceback (most recent call last): File "/root/anaconda3/envs/neo/lib/python3.10/site-packages/albumentations/check_version.py", line 29, in fetch_version_info with opener.open(url, timeout=2) as response: File "/root/anaconda3/envs/neo/lib/python3.10/urllib/request.py", line 519, in open response = self._open(req, data) File "/root/anaconda3/envs/neo/lib/python3.10/urllib/request.py", line 536, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/root/anaconda3/envs/neo/lib/python3.10/urllib/request.py", line 496, in _call_chain result = func(*args) File "/root/anaconda3/envs/neo/lib/python3.10/urllib/request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/root/anaconda3/envs/neo/lib/python3.10/urllib/request.py", line 1352, in do_open r = h.getresponse() File "/root/anaconda3/envs/neo/lib/python3.10/http/client.py", line 1374, in getresponse response.begin() File "/root/anaconda3/envs/neo/lib/python3.10/http/client.py", line 337, in begin self.headers = self.msg = parse_headers(self.fp) File "/root/anaconda3/envs/neo/lib/python3.10/http/client.py", line 234, in parse_headers headers = _read_headers(fp) File "/root/anaconda3/envs/neo/lib/python3.10/http/client.py", line 214, in _read_headers line = fp.readline(_MAXLINE + 1) File "/root/anaconda3/envs/neo/lib/python3.10/socket.py", line 705, in readinto return self._sock.recv_into(b) File "/root/anaconda3/envs/neo/lib/python3.10/ssl.py", line 1273, in recv_into return self.read(nbytes, buffer) File "/root/anaconda3/envs/neo/lib/python3.10/ssl.py", line 1129, in read return self._sslobj.read(len, buffer) TimeoutError: The read operation timed out Traceback (most recent call last): File "/root/Code/MAP-NEO/document-convert/multi_thread_process_to_doc.py", line 12, in from latex.latex_rec import Latex2Text, sort_boxes File "/root/Code/MAP-NEO/document-convert/latex/latex_rec.py", line 24, in from cnstd.yolov7.general import xyxy24p, box_partial_overlap ImportError: cannot import name 'xyxy24p' from 'cnstd.yolov7.general' (/root/anaconda3/envs/neo/lib/python3.10/site-packages/cnstd/yolov7/general.py)