-
Notifications
You must be signed in to change notification settings - Fork 6.8k
remove async capability enum #57666
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: master
Are you sure you want to change the base?
remove async capability enum #57666
Conversation
harshit-anyscale
commented
Oct 13, 2025
- removing enum capability enum as it is not being used, for more details: add celery default serializer and add new fields in celery adapter config #56707 (comment)
Signed-off-by: harshit <[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 pull request correctly removes the unused AsyncCapability
enum and its related logic from TaskProcessorAdapter
, which simplifies the code. The changes are focused and look good. I've added one comment to improve the clarity of the __init__
method's docstring. As a follow-up, you might also want to update the class docstring for TaskProcessorAdapter
in python/ray/serve/schema.py
which still refers to the removed supports_async_capability
method, and remove a stale comment in CeleryTaskProcessorAdapter.__init__
in python/ray/serve/task_processor.py
that refers to the removed _async_capabilities
attribute.
""" | ||
Initialize the TaskProcessorAdapter. | ||
Sets up an empty set of async capabilities. Subclasses should add their | ||
supported async capabilities to self._async_capabilities in their __init__ | ||
method. | ||
""" | ||
self._async_capabilities: Set[AsyncCapability] = set() | ||
|
||
@property | ||
def async_capabilities(self) -> Set[AsyncCapability]: | ||
""" | ||
Get the set of async capabilities supported by this adapter. | ||
Returns: | ||
Set[AsyncCapability]: A copy of the set containing all async capabilities | ||
supported by this adapter. Modifying the returned set will not affect | ||
the adapter's capabilities. | ||
""" | ||
return self._async_capabilities.copy() | ||
|
||
def supports_async_capability(self, capability: AsyncCapability) -> bool: | ||
""" |
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.
Signed-off-by: harshit <[email protected]>