Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] <title>启动embedding模型报错 #617

Open
2 tasks done
xiaoyuer2019 opened this issue Mar 5, 2025 · 4 comments
Open
2 tasks done

[BUG] <title>启动embedding模型报错 #617

xiaoyuer2019 opened this issue Mar 5, 2025 · 4 comments

Comments

@xiaoyuer2019
Copy link

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

  • 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

  • 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior

You are using a model of type xlm-roberta to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
[2025-03-05 14:10:44 +0800] [393811] [ERROR] 'PretrainedConfig' object has no attribute 'lora_adaptations'
Traceback (most recent call last):
File "/data/anaconda3/envs/qanything/lib/python3.10/site-packages/sanic/worker/serve.py", line 117, in worker_serve
return _serve_http_1(
File "/data/anaconda3/envs/qanything/lib/python3.10/site-packages/sanic/server/runners.py", line 223, in _serve_http_1
loop.run_until_complete(app._server_event("init", "before"))
File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
File "/data/anaconda3/envs/qanything/lib/python3.10/site-packages/sanic/app.py", line 1764, in _server_event
await self.dispatch(
File "/data/anaconda3/envs/qanything/lib/python3.10/site-packages/sanic/signals.py", line 208, in dispatch
return await dispatch
File "/data/anaconda3/envs/qanything/lib/python3.10/site-packages/sanic/signals.py", line 183, in _dispatch
raise e
File "/data/anaconda3/envs/qanything/lib/python3.10/site-packages/sanic/signals.py", line 167, in _dispatch
retval = await maybe_coroutine
File "/data/anaconda3/envs/qanything/lib/python3.10/site-packages/sanic/app.py", line 1315, in _listener
await maybe_coro
File "/ssd128/QAnything/qanything_kernel/dependent_server/embedding_server/embedding_server.py", line 60, in setup_onnx_backend
app.ctx.onnx_backend = EmbeddingOnnxBackend(use_cpu=not args.use_gpu)
File "/ssd128/QAnything/qanything_kernel/dependent_server/embedding_server/embedding_onnx_backend.py", line 24, in init
self.task_id = np.array(self._config.lora_adaptations.index(self.default_task_type), dtype=np.int64)
File "/data/anaconda3/envs/qanything/lib/python3.10/site-packages/transformers/configuration_utils.py", line 265, in getattribute
return super().getattribute(key)
AttributeError: 'PretrainedConfig' object has no attribute 'lora_adaptations'
[2025-03-05 14:10:44 +0800] [390942] [ERROR] Not all workers acknowledged a successful startup. Shutting down.

One of your worker processes terminated before startup was completed. Please solve any errors experienced during startup. If you do not see an exception traceback in your error logs, try running Sanic in in a single process using --single-process or single_process=True. Once you are confident that the server is able to start without errors you can switch back to multiprocess mode.
[2025-03-05 14:10:44 +0800] [390942] [INFO] Killing Sanic-Server-0-0 [393811]
[2025-03-05 14:10:44 +0800] [390942] [INFO] Server Stopped

期望行为 | Expected Behavior

No response

运行环境 | Environment

- OS:
- NVIDIA Driver:
- CUDA:
- Docker Compose:
- NVIDIA GPU Memory:

QAnything日志 | QAnything logs

No response

复现方法 | Steps To Reproduce

No response

备注 | Anything else?

No response

@xiaoyuer2019
Copy link
Author

在docker里运行也是报这个错误

/workspace/QAnything
UPLOAD_ROOT_PATH: /workspace/QAnything/QANY_DB/content
IMAGES_ROOT_PATH: /workspace/QAnything/qanything_kernel/qanything_server/dist/qanything/assets/file_images
<Logger debug_logger (INFO)> <Logger qa_logger (INFO)> <Logger rerank_logger (INFO)> <Logger embed_logger (INFO)> <Logger insert_logger (INFO)>
/usr/local/lib/python3.10/site-packages/transformers/utils/generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
_torch_pytree._register_pytree_node(
args: Namespace(use_gpu=False, workers=1)
[2025-03-05 06:15:40 +0000] [15] [INFO] Sanic v23.6.0
[2025-03-05 06:15:40 +0000] [15] [INFO] Goin' Fast @ http://0.0.0.0:9001
[2025-03-05 06:15:40 +0000] [15] [INFO] mode: production, single worker
[2025-03-05 06:15:40 +0000] [15] [INFO] server: sanic, HTTP/1.1
[2025-03-05 06:15:40 +0000] [15] [INFO] python: 3.10.14
[2025-03-05 06:15:40 +0000] [15] [INFO] platform: Linux-5.4.268-1.el8.elrepo.x86_64-x86_64-with-glibc2.36
[2025-03-05 06:15:40 +0000] [15] [INFO] packages: sanic-routing==23.12.0, sanic-ext==23.6.0
/usr/local/lib/python3.10/site-packages/transformers/utils/generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
_torch_pytree._register_pytree_node(
/usr/local/lib/python3.10/site-packages/transformers/utils/generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
_torch_pytree._register_pytree_node(
/workspace/QAnything
UPLOAD_ROOT_PATH: /workspace/QAnything/QANY_DB/content
IMAGES_ROOT_PATH: /workspace/QAnything/qanything_kernel/qanything_server/dist/qanything/assets/file_images
<Logger debug_logger (INFO)> <Logger qa_logger (INFO)> <Logger rerank_logger (INFO)> <Logger embed_logger (INFO)> <Logger insert_logger (INFO)>
args: Namespace(use_gpu=False, workers=1)
[2025-03-05 06:15:56 +0000] [1097] [INFO] Sanic Extensions:
[2025-03-05 06:15:56 +0000] [1097] [INFO] > injection [0 dependencies; 0 constants]
[2025-03-05 06:15:56 +0000] [1097] [INFO] > openapi [http://0.0.0.0:9001/docs]
[2025-03-05 06:15:56 +0000] [1097] [INFO] > http
[2025-03-05 06:15:56 +0000] [1097] [INFO] > templating [jinja2==3.1.4]
You are using a model of type xlm-roberta to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
[2025-03-05 06:15:58 +0000] [1097] [ERROR] 'PretrainedConfig' object has no attribute 'lora_adaptations'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/sanic/worker/serve.py", line 117, in worker_serve
return _serve_http_1(
File "/usr/local/lib/python3.10/site-packages/sanic/server/runners.py", line 223, in _serve_http_1
loop.run_until_complete(app._server_event("init", "before"))
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
File "/usr/local/lib/python3.10/site-packages/sanic/app.py", line 1764, in _server_event
await self.dispatch(
File "/usr/local/lib/python3.10/site-packages/sanic/signals.py", line 208, in dispatch
return await dispatch
File "/usr/local/lib/python3.10/site-packages/sanic/signals.py", line 183, in _dispatch
raise e
File "/usr/local/lib/python3.10/site-packages/sanic/signals.py", line 167, in _dispatch
retval = await maybe_coroutine
File "/usr/local/lib/python3.10/site-packages/sanic/app.py", line 1315, in _listener
await maybe_coro
File "/workspace/QAnything/qanything_kernel/dependent_server/embedding_server/embedding_server.py", line 60, in setup_onnx_backend
app.ctx.onnx_backend = EmbeddingOnnxBackend(use_cpu=not args.use_gpu)
File "/workspace/QAnything/qanything_kernel/dependent_server/embedding_server/embedding_onnx_backend.py", line 24, in init
self.task_id = np.array(self._config.lora_adaptations.index(self.default_task_type), dtype=np.int64)
File "/usr/local/lib/python3.10/site-packages/transformers/configuration_utils.py", line 265, in getattribute
return super().getattribute(key)
AttributeError: 'PretrainedConfig' object has no attribute 'lora_adaptations'
[2025-03-05 06:15:58 +0000] [15] [ERROR] Not all workers acknowledged a successful startup. Shutting down.

One of your worker processes terminated before startup was completed. Please solve any errors experienced during startup. If you do not see an exception traceback in your error logs, try running Sanic in in a single process using --single-process or single_process=True. Once you are confident that the server is able to start without errors you can switch back to multiprocess mode.
[2025-03-05 06:15:58 +0000] [15] [INFO] Killing Sanic-Server-0-0 [1097]
[2025-03-05 06:15:58 +0000] [15] [INFO] Server Stopped
/workspace/QAnything
UPLOAD_ROOT_PATH: /workspace/QAnything/QANY_DB/content
IMAGES_ROOT_PATH: /workspace/QAnything/qanything_kernel/qanything_server/dist/qanything/assets/file_images
<Logger debug_logger (INFO)> <Logger qa_logger (INFO)> <Logger rerank_logger (INFO)> <Logger embed_logger (INFO)> <Logger insert_logger (INFO)>
args: Namespace(use_gpu=False, workers=1)

@xiaoyuer2019
Copy link
Author

最新的2.1版本的问题

@GreatStep
Copy link

xixihahaliu01/qanything-win:v1.5.1 哪里有 2.1 ?

@xiaoyuer2019
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants