Skip to content

Conversation

DNXie
Copy link
Member

@DNXie DNXie commented Sep 24, 2025

A follow up on #222
This pull request introduces explicit error handling for Monarch-style methods (call_one, broadcast, generate, choose, call) on the ServiceEndpoint class. Attempting to invoke these methods on a service endpoint will now raise a NotImplementedError with a clear message indicating that these operations are only supported for actors, not services. The error message guides users to use the supported route() and fanout() methods for service endpoints.

Testing

  • Added test_service_endpoint_monarch_method_error to ensure that each unsupported method raises the correct exception and message.
  • All existing and new tests pass.

@DNXie DNXie requested a review from allenwang28 September 24, 2025 23:03
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 24, 2025
@DNXie DNXie merged commit c868aee into meta-pytorch:main Sep 24, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants