PP-DocLayoutV2模型批量推理报错
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start with model/layout/rapid_layout_self/model_handler/pp_doclayout/main.py, where batch inputs are passed to the ONNX Runtime session, then inspect inference_engine/onnxruntime/main.py and reproduce the failure with the reported batch_size=128. Done means PP-DocLayoutV2 batch inference completes without the reported ScatterND ONNXRuntimeError.
Written by the indexing model from the issue text.
Description
Traceback (most recent call last):
File "D:\code\rapid_doc\model\layout\rapid_layout_self\inference_engine\onnxruntime\main.py", line 75, in __call__
return self.session.run(self.get_output_names(), input_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\.venv\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 287, in run
return self._sess.run(output_names, input_feed, run_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running ScatterND node. Name:'ScatterND.1' Status Message: updates tensor should have shape equal to indices.shape[:-1] + data.shape[indices.shape[-1]:]. updates shape: {1}, indices shape: {2}, data shape: {302,2}
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\code\rapid_doc\rapid_doc_202601021446.py", line 10, in <module>
all_results = model.__call__(img_contents=img_contents, batch_size=128)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\rapid_doc\model\layout\rapid_layout_self\main.py", line 50, in __call__
results = self.model_handler(batch_imgs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\rapid_doc\model\layout\rapid_layout_self\model_handler\main.py", line 34, in __call__
return self.model_processors(img_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\rapid_doc\model\layout\rapid_layout_self\model_handler\pp_doclayout\main.py", line 54, in __call__
batch_preds = self.session(img_inputs, scale_factor_inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\rapid_doc\model\layout\rapid_layout_self\inference_engine\onnxruntime\main.py", line 78, in __call__
raise ONNXRuntimeError(error_info) from e
rapid_doc.model.layout.rapid_layout_self.inference_engine.onnxruntime.main.ONNXRuntimeError: Traceback (most recent call last):
File "D:\code\rapid_doc\model\layout\rapid_layout_self\inference_engine\onnxruntime\main.py", line 75, in __call__
return self.session.run(self.get_output_names(), input_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\.venv\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 287, in run
return self._sess.run(output_names, input_feed, run_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running ScatterND node. Name:'ScatterND.1' Status Message: updates tensor should have shape equal to indices.shape[:-1] + data.shape[indices.shape[-1]:]. updates shape: {1}, indices shape: {2}, data shape: {302,2}
- Dominant language
- Python
- Stars
- 233
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RapidAI/RapidDoc
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
新增大 Excel 轻量级解析路径,解决大表格 OOMPossibly taken @ving7176 claimed this 66 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
All issues in RapidAI/RapidDoc
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
MISP/misp-workbench#496 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
fossasia/visdom-dev#69 ·
Maintainers usually reply within 3 days
-
[Bug] Parameters named like a property break to_xcal()Possibly taken @atharvasalunke1267 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
collective/icalendar#2018 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day