Skip to content

Conversation

harshit-anyscale
Copy link
Contributor

@harshit-anyscale harshit-anyscale requested a review from a team as a code owner October 13, 2025 04:40
@harshit-anyscale harshit-anyscale self-assigned this Oct 13, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

Comment on lines 1391 to 1394
"""
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:
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The docstring for __init__ can be simplified to a single line since it's just a summary now. The current formatting with extra blank lines can be confusing.

        """Initialize the TaskProcessorAdapter."""

@harshit-anyscale harshit-anyscale requested a review from a team as a code owner October 13, 2025 05:28
@ray-gardener ray-gardener bot added the core Issues that should be addressed in Ray Core label Oct 13, 2025
@harshit-anyscale harshit-anyscale added the go add ONLY when ready to merge, run all tests label Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants