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

HFClientVLLM passes extra parameters to vLLM server causing extra_forbidden error #974

Closed
DamianB-BitFlipper opened this issue May 5, 2024 · 7 comments · Fixed by #1043

Comments

@DamianB-BitFlipper
Copy link

DSPy version: 2.4.9
vLLM version: 0.4.2

When the HFClientVLLM performs an HTTP request to a vLLM server, it passes kwargs. The kwargs has values such as port and url that are not recognized by the vLLM server. This is in this line

The issue is that in the latest vLLM release, extra (unrecognized) parameters, throw an error. This is due to line .

In all, when using the HFClientVLLM, this causes the following error:

Failed to parse JSON response: {"object":"error","message":"[{'type': 'extra_forbidden', 'loc': ('body', 'port'), 'msg': 'Extra inputs are not permitted', 'input': 443}, {'type': 'extra_forbidden', 'loc': ('body', 'url'), 'msg': 'Extra inputs are not permitted', 'input': ['localhost:443']}]","type":"BadRequestError","param":null,"code":400}
Traceback (most recent call last):

I hope that this issue is insightful.

@omkar-sh
Copy link
Contributor

Do we remove only port and url or all the kwargs provided by the user that are not in pydantic variables?

@DamianB-BitFlipper
Copy link
Author

DamianB-BitFlipper commented May 11, 2024 via email

@omkar-sh
Copy link
Contributor

Made this PR. Please checkout. Link

@DamianB-BitFlipper
Copy link
Author

Hey. Thanks for your PR. I do not think that does what you think it does. The keys port and url should be removed from the kwargs. What you are doing is filtering only them. I would suggest using the dict.pop method: https://www.programiz.com/python-programming/methods/dictionary/pop

@omkar-sh
Copy link
Contributor

I missed negating the if statement. Fixed the same now.

@DamianB-BitFlipper
Copy link
Author

Moving this conversation to the PR. I left a comment there.

@LorenzoMinto
Copy link

Also system_prompt looks like should be removed. Added a PR here.

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

Successfully merging a pull request may close this issue.

3 participants