Skip to content

[Serve] Handle options do not update correctly #12798

@architkulkarni

Description

@architkulkarni

After calling handle.options(method_name="my_method_1"), calling handle.options(method_name="my_method_2") on the same handle doesn't update the method name. The solution is to swap self.method_name and method_name in the right hand side of the line self.method_name = method_name or self.method_name, and similarly for the other options. We should write tests for this too.

In handle.options we use optional arguments that default to None. However we have other defaults in mind, such as "__call__" for method_name. With the change above, we cannot pass in None to revert to the default, because we can't distinguish between an omitted keyword-argument and one that is explicitly set to None. To make argument passing work, we can look into using enums, or imitating the function-wrapper approach taken by ActorMethod.options() in actor.py.

Metadata

Metadata

Labels

serveRay Serve Related Issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions