eosphoros-ai / DB-GPT

AI Native Data App Development framework with AWEL(Agentic Workflow Expression Language) and Agents
http://docs.dbgpt.cn
MIT License
13.82k stars 1.86k forks source link

[Bug]vllm error,ValueError: mutable default <class 'list'> for field ignore_patterns is not allowed: use default_factory #1827

Open huaji23 opened 3 months ago

huaji23 commented 3 months ago

Search before asking

Operating system information

Linux

Python version information

=3.11

DB-GPT version

main

Related scenes

Installation Information

Device information

使用vllm报错,ValueError: mutable default <class 'list'> for field ignore_patterns is not allowed: use default_factory

Models information

使用vllm报错,ValueError: mutable default <class 'list'> for field ignore_patterns is not allowed: use default_factory

What happened

发生异常: ValueError mutable default <class 'list'> for field ignore_patterns is not allowed: use default_factory File "/root/xh-project/DB-GPT/dbgpt/util/parameter_utils.py", line 552, in _build_parameter_class result_class = dataclass(new_class) # type: ignore ^^^^^^^^^^^^^^^^^^^^ File "/root/xh-project/DB-GPT/dbgpt/model/adapter/vllm_adapter.py", line 58, in model_param_class return _build_parameter_class(descs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/xh-project/DB-GPT/dbgpt/model/cluster/worker/default_worker.py", line 56, in load_worker self.param_cls = self.llm_adapter.model_param_class(model_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/xh-project/DB-GPT/dbgpt/model/cluster/worker/manager.py", line 163, in add_worker worker.load_worker(**asdict(worker_params)) File "/root/xh-project/DB-GPT/dbgpt/model/cluster/worker/manager.py", line 1005, in _start_local_worker worker_manager.worker_manager.add_worker(worker, worker_params) File "/root/xh-project/DB-GPT/dbgpt/model/cluster/worker/manager.py", line 1074, in initialize_worker_manager_in_client _start_local_worker(worker_manager, worker_params) File "/root/xh-project/DB-GPT/dbgpt/app/dbgpt_server.py", line 184, in initialize_app initialize_worker_manager_in_client( File "/root/xh-project/DB-GPT/dbgpt/app/dbgpt_server.py", line 259, in run_webserver param = initialize_app(param) ^^^^^^^^^^^^^^^^^^^^^ File "/root/xh-project/DB-GPT/dbgpt/app/dbgpt_server.py", line 264, in run_webserver() ValueError: mutable default <class 'list'> for field ignore_patterns is not allowed: use default_factory

What you expected to happen

使用vllm报错,ValueError: mutable default <class 'list'> for field ignore_patterns is not allowed: use default_factory

How to reproduce

使用vllm报错,ValueError: mutable default <class 'list'> for field ignore_patterns is not allowed: use default_factory

Additional context

使用vllm报错,ValueError: mutable default <class 'list'> for field ignore_patterns is not allowed: use default_factory

Are you willing to submit PR?

Mosquito0352 commented 3 months ago

同样的错误 怎么解决呢

huaji23 commented 3 months ago

+1

Aries-ckt commented 3 months ago

/assign @fangyinc

fangyiwb commented 3 months ago

同问,现在解决了吗?

TuDaCheng commented 2 months ago

同样的错 按照这个方式改了一下代码解决了https://blog.csdn.net/m0_55387836/article/details/141569256