lagent icon indicating copy to clipboard operation
lagent copied to clipboard

ModuleNotFoundError: No module named 'lagent.llms.lmdeploy_wrapper'

Open Dubby893 opened this issue 1 year ago • 11 comments

How to resolve this issue?

Dubby893 avatar Jun 26 '24 14:06 Dubby893

can you provide your use case?

Harold-lkk avatar Jun 27 '24 03:06 Harold-lkk

Q1

Dubby893 avatar Jun 27 '24 09:06 Dubby893

Q3

Dubby893 avatar Jun 27 '24 09:06 Dubby893

Can you install Lagent from the source? We fix a typo lmdepoly-> lmdeploy but don't release a new package, so if you install from pypi, it will get a error

Harold-lkk avatar Jul 01 '24 03:07 Harold-lkk

I downloaded version 0.2.2 and then used this command to install lagent:python setup.py install, but I get an error that I can't find the Imdeploy module? Snipaste_2024-07-01_12-24-57

Dubby893 avatar Jul 01 '24 04:07 Dubby893

I successfully opened the page, but it keeps showing that the connection failed. 超时

Dubby893 avatar Jul 01 '24 04:07 Dubby893

still not working for me, same error...

MarceloEmmerich avatar Jul 06 '24 10:07 MarceloEmmerich

I successfully opened the page, but it keeps showing that the connection failed. 超时

I have the same problem, have you solved it?

CostaliyA avatar Aug 03 '24 06:08 CostaliyA

i tried today with latest version and it works now

MarceloEmmerich avatar Aug 03 '24 08:08 MarceloEmmerich

i tried today with latest version and it works now

I tried again, but the same error message still popped up. Could you tell me how you deployed it? Thanks!

CostaliyA avatar Aug 04 '24 07:08 CostaliyA

Yeah me too. The latest version 0.2.3 happens again.

GinRyan avatar Aug 15 '24 10:08 GinRyan

目前还是存在此问题

XFNxiaofuni avatar Nov 16 '24 12:11 XFNxiaofuni

/home/zhangwh/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/lagent/llms/init.py中有lmdeploy_wrapper正确拼写,我的代码:from lagent.llms.lmdeploy_wrapper import LMDeployClient 但是打开网页后存在: ConnectionError: HTTPConnectionPool(host='0.0.0.0', port=23333): Max retries exceeded with url: /v1/completions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f12c8504fa0>: Failed to establish a new connection: [Errno 111] Connection refused')) Traceback: File "/home/zhangwh/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() File "/home/zhangwh/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec exec(code, module.dict) File "/home/ubuntu/nfs/8T2/LinChenyi2024/OculiChatDA-main/web_demo.py", line 380, in main() File "/home/ubuntu/nfs/8T2/LinChenyi2024/OculiChatDA-main/web_demo.py", line 334, in main for agent_return in st.session_state['chatbot'].stream_chat( File "/home/ubuntu/nfs/8T2/LinChenyi2024/OculiChatDA-main/utils/internlm2_agent.py", line 305, in stream_chat for model_state, res, _ in self._llm.stream_chat(prompt, **kwargs): File "/home/zhangwh/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/lagent/llms/lmdeploy_wrapper.py", line 452, in stream_chat for text in self.client.completions_v1( File "/home/zhangwh/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/lmdeploy/serve/openai/api_client.py", line 282, in completions_v1 response = requests.post(self.completions_v1_url, File "/home/zhangwh/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, **kwargs) File "/home/zhangwh/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/home/zhangwh/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/home/zhangwh/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/zhangwh/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) 问题。

XFNxiaofuni avatar Nov 16 '24 12:11 XFNxiaofuni