OpenMOSS / OpenMOSS/MOSS

onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from moss-moon-003-sft-plugin failed:Protobuf parsing failed

Open
#264 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.3k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

参考 https://github.com/OpenLMLab/MOSS_Vortex 换了个模型

2023-05-11 11:04:36,394 - 82 - INFO - mosec_server.py:357 - [MOSEC] [INIT] Initializing model on device=3
2023-05-11 11:04:36,423 - 124 - INFO - mosec_server.py:357 - [MOSEC] [INIT] Initializing model on device=4
2023-05-11 11:04:36,443 - 79 - INFO - mosec_server.py:357 - [MOSEC] [INIT] Initializing model on device=0
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
2023-05-11 11:04:36,621 - 81 - INFO - mosec_server.py:359 - [MOSEC] [INIT] Using computing device: cuda
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
{"timestamp": "2023-05-11T11:04:36.715112+0800", "level": "INFO", "fields": {"message": "<1|Preprocess|6> socket connected to /tmp/mosec_a635e0d/ipc_1.socket"}, "target": "protocol.py:open"}
2023-05-11 11:04:36,715 - 78 - INFO - protocol.py:141 - <1|Preprocess|6> socket connected to /tmp/mosec_a635e0d/ipc_1.socket
{"timestamp": "2023-05-11T11:04:36.742202+0800", "level": "INFO", "fields": {"message": "<1|Preprocess|1> socket connected to /tmp/mosec_a635e0d/ipc_1.socket"}, "target": "protocol.py:open"}
2023-05-11 11:04:36,742 - 53 - INFO - protocol.py:141 - <1|Preprocess|1> socket connected to /tmp/mosec_a635e0d/ipc_1.socket
{"timestamp": "2023-05-11T11:04:36.760997+0800", "level": "INFO", "fields": {"message": "<1|Preprocess|5> socket connected to /tmp/mosec_a635e0d/ipc_1.socket"}, "target": "protocol.py:open"}
2023-05-11 11:04:36,760 - 67 - INFO - protocol.py:141 - <1|Preprocess|5> socket connected to /tmp/mosec_a635e0d/ipc_1.socket
{"timestamp": "2023-05-11T11:04:36.798910+0800", "level": "INFO", "fields": {"message": "<1|Preprocess|4> socket connected to /tmp/mosec_a635e0d/ipc_1.socket"}, "target": "protocol.py:open"}
2023-05-11 11:04:36,798 - 64 - INFO - protocol.py:141 - <1|Preprocess|4> socket connected to /tmp/mosec_a635e0d/ipc_1.socket
{"timestamp": "2023-05-11T11:04:36.883819+0800", "level": "INFO", "fields": {"message": "<1|Preprocess|3> socket connected to /tmp/mosec_a635e0d/ipc_1.socket"}, "target": "protocol.py:open"}
2023-05-11 11:04:36,883 - 61 - INFO - protocol.py:141 - <1|Preprocess|3> socket connected to /tmp/mosec_a635e0d/ipc_1.socket
2023-05-11 11:04:37,023 - 81 - INFO - mosec_server.py:366 - [MOSEC] [INIT] ONNX Model Loading
Process SpawnProcess-9:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/dist-packages/mosec/coordinator.py", line 81, in __init__
    self.worker = worker()
  File "/mosec/mosec_server.py", line 367, in __init__
    self.ort_session = ort.InferenceSession(self.model_path, ort.SessionOptions(),providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
  File "/usr/local/lib/python3.8/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 360, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "/usr/local/lib/python3.8/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 397, in _create_inference_session
    sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from moss-moon-003-sft-plugin failed:Protobuf parsing failed.
2023-05-11 11:04:38,155 - 126 - INFO - mosec_server.py:359 - [MOSEC] [INIT] Using computing device: cpu
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
2023-05-11 11:04:38,162 - 80 - INFO - mosec_server.py:359 - [MOSEC] [INIT] Using computing device: cuda
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
2023-05-11 11:04:38,170 - 124 - INFO - mosec_server.py:359 - [MOSEC] [INIT] Using computing device: cpu
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
2023-05-11 11:04:38,216 - 82 - INFO - mosec_server.py:359 - [MOSEC] [INIT] Using computing device: cuda
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
2023-05-11 11:04:38,224 - 79 - INFO - mosec_server.py:359 - [MOSEC] [INIT] Using computing device: cuda
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
2023-05-11 11:04:38,602 - 126 - INFO - mosec_server.py:366 - [MOSEC] [INIT] ONNX Model Loading
2023-05-11 11:04:38,606 - 80 - INFO - mosec_server.py:366 - [MOSEC] [INIT] ONNX Model Loading
2023-05-11 11:04:38,698 - 79 - INFO - mosec_server.py:366 - [MOSEC] [INIT] ONNX Model Loading
2023-05-11 11:04:38,712 - 124 - INFO - mosec_server.py:366 - [MOSEC] [INIT] ONNX Model Loading

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at mosec_server.py line 367, where ort.InferenceSession loads the configured model path, and compare the substituted model with the expected ONNX input. Verify the model can be parsed before initialization completes; done means the model loads without the INVALID_PROTOBUF error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.