Skip to content

Conversation

@AllentDan
Copy link
Collaborator

No description provided.

@lvhan028 lvhan028 added the enhancement New feature or request label Aug 1, 2023
@irexyc
Copy link
Collaborator

irexyc commented Aug 4, 2023

Does it depend on a specific gradio version? I can't run it wht latest gradio version.
from gradio.components import * doesn't import @ducoment in latest gradio

After install gradio 3.24.1 and gradio_client 0.0.8, I get this log:

(py38) [chenxin@SH-IDC1-10-140-24-141 chenxin]$ python3 -m lmdeploy.serve.gradio.app workspace/
/home/chenxin/miniconda3/envs/py38/lib/python3.8/site-packages/gradio/utils.py:874: UserWarning: Expected 5 arguments for function functools.partial(<function chat_stream_local at 0x7fec0348baf0>, model=<lmdeploy.model.Vicuna object at 0x7fec0348d5b0>, tm_model=<lmdeploy.turbomind.turbomind.TurboMind object at 0x7fec00a00190>, tokenizer=<lmdeploy.turbomind.tokenizer.Tokenizer object at 0x7fec0348d400>, request2instance={}), received 4.
  warnings.warn(
/home/chenxin/miniconda3/envs/py38/lib/python3.8/site-packages/gradio/utils.py:878: UserWarning: Expected at least 5 arguments for function functools.partial(<function chat_stream_local at 0x7fec0348baf0>, model=<lmdeploy.model.Vicuna object at 0x7fec0348d5b0>, tm_model=<lmdeploy.turbomind.turbomind.TurboMind object at 0x7fec00a00190>, tokenizer=<lmdeploy.turbomind.tokenizer.Tokenizer object at 0x7fec0348d400>, request2instance={}), received 4.
  warnings.warn(
/home/chenxin/miniconda3/envs/py38/lib/python3.8/site-packages/gradio/utils.py:874: UserWarning: Expected 5 arguments for function functools.partial(<function reset_local_func at 0x7fec0348bb80>, tm_model=<lmdeploy.turbomind.turbomind.TurboMind object at 0x7fec00a00190>, request2instance={}), received 4.
  warnings.warn(
/home/chenxin/miniconda3/envs/py38/lib/python3.8/site-packages/gradio/utils.py:878: UserWarning: Expected at least 5 arguments for function functools.partial(<function reset_local_func at 0x7fec0348bb80>, tm_model=<lmdeploy.turbomind.turbomind.TurboMind object at 0x7fec00a00190>, request2instance={}), received 4.
  warnings.warn(
server is gonna mount on: http://localhost:6006
Running on local URL:  http://localhost:6006

And when I run the model, I get

Task exception was never retrieved
future: <Task finished name='bskzc65nxa_0' coro=<Queue.process_events() done, defined at /home/chenxin/miniconda3/envs/py38/lib/python3.8/site-packages/gradio/queueing.py:343> exception=1 validation error for PredictBody
event_id
  Field required [type=missing, input_value={'fn_index': 0, 'data': [...ion_hash': 'bskzc65nxa'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.1/v/missing>
Traceback (most recent call last):
  File "/home/chenxin/miniconda3/envs/py38/lib/python3.8/site-packages/gradio/queueing.py", line 347, in process_events
    client_awake = await self.gather_event_data(event)
  File "/home/chenxin/miniconda3/envs/py38/lib/python3.8/site-packages/gradio/queueing.py", line 220, in gather_event_data
    data, client_awake = await self.get_message(event, timeout=receive_timeout)
  File "/home/chenxin/miniconda3/envs/py38/lib/python3.8/site-packages/gradio/queueing.py", line 456, in get_message
    return PredictBody(**data), True
  File "/home/chenxin/miniconda3/envs/py38/lib/python3.8/site-packages/pydantic/main.py", line 159, in __init__
    __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody
event_id
  Field required [type=missing, input_value={'fn_index': 0, 'data': [...ion_hash': 'bskzc65nxa'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.1/v/missing

What dependents requires nh3 ? Shoud we add it to requirements?

@AllentDan
Copy link
Collaborator Author

Tested OK with upgraded gradio-3.39.0 and gradio-client-0.3.0. 🤔

AllentDan and others added 6 commits August 4, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants