-
Notifications
You must be signed in to change notification settings - Fork 712
patch: adapt attribution get error #274
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves error handling and logging for the vLLM async server by adding defensive error status code handling and error logging capabilities.
- Added error logging when vLLM chat completion errors occur
- Implemented defensive status code extraction with a fallback to 500
- Removed unused import
ChatCompletionResponsePatched
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if isinstance(generator, ErrorResponse): | ||
| return JSONResponse(content=generator.model_dump(), status_code=generator.code) | ||
| status_code = getattr(generator, "code", None) or 500 |
Copilot
AI
Nov 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fallback to 500 may mask situations where generator.code is 0 or another falsy value. Consider explicitly checking for None: status_code = getattr(generator, 'code', None); status_code = status_code if status_code is not None else 500 or using status_code = getattr(generator, 'code', 500).
| status_code = getattr(generator, "code", None) or 500 | |
| status_code = getattr(generator, "code", None) | |
| status_code = status_code if status_code is not None else 500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this comment makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. It may be necessary to check the status code to see if it is used in AgentLightning and which code may be returned by verl.
| return cls | ||
|
|
||
|
|
||
| logger = configure_logger() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be logger = logging.getLogger(__name__)
No description provided.