-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[Serve] Preserve deployment metadata on wrapper classes #58478
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
[Serve] Preserve deployment metadata on wrapper classes #58478
Conversation
Signed-off-by: teddygood <[email protected]>
Signed-off-by: teddygood <[email protected]>
Signed-off-by: teddygood <[email protected]>
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.
Code Review
This is a solid pull request that correctly addresses the issue of preserving metadata on wrapper classes in Ray Serve. The introduction of the copy_class_metadata utility function is a clean way to centralize this logic, and its application in the ingress and task_consumer decorators is appropriate. The new tests are well-written and provide good coverage for the added functionality, ensuring that attributes like __name__, __qualname__, __module__, __doc__, and __annotations__ are correctly propagated. The changes improve the introspection capabilities of Serve deployments and are a welcome enhancement.
Signed-off-by: teddygood <[email protected]>
Signed-off-by: teddygood <[email protected]>
|
Hi @abrarsheikh |
Fixes #58240, Related to #57664
Ensure Serve wrapper classes preserve original class metadata. Wrappers now copy
__qualname__,__module__,__doc__,__annotations__, and__wrapped__in addition to__name__. Added tests to verify metadata preservation fortask_consumerandingressdecorators.