DB-GPT icon indicating copy to clipboard operation
DB-GPT copied to clipboard

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

Open huaji23 opened this issue 1 year ago • 5 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Operating system information

Linux

Python version information

=3.11

DB-GPT version

main

Related scenes

  • [ ] Chat Data
  • [ ] Chat Excel
  • [ ] Chat DB
  • [ ] Chat Knowledge
  • [ ] Model Management
  • [ ] Dashboard
  • [ ] Plugins

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?

  • [ ] Yes I am willing to submit a PR!

huaji23 avatar Aug 14 '24 08:08 huaji23

同样的错误 怎么解决呢

Mosquito0352 avatar Aug 14 '24 08:08 Mosquito0352

+1

huaji23 avatar Aug 14 '24 09:08 huaji23

/assign @fangyinc

Aries-ckt avatar Aug 15 '24 15:08 Aries-ckt

同问,现在解决了吗?

fangyiwb avatar Aug 26 '24 08:08 fangyiwb

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

TuDaCheng avatar Sep 04 '24 10:09 TuDaCheng