Repository navigation
fix: Raise the exceptions of the client callbacks in the caller of a distributed batched_run - #1903
Merged
Conversation
…ibuted batched_run A distributed call turned an exception of the client preprocessing or postprocessing on the remote node into an exit in the caller. A local call raises the exception. So a caller had to rescue an exception for a local serving and catch an exit for a remote serving. Now the remote node sends the exception and its stacktrace, and the caller raises them again. This also applies to an exception while the remote node enumerates a stream of the client postprocessing.
Member
Author
polvalente
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
client_preprocessingorclient_postprocessingraises in a distributedbatched_run, the remote process crashes and the caller exits. A local call raises the exception. So a caller must rescue the exception for a local serving and catch an exit for a remote serving, for example to reply to bad input.This change rescues the exception on the remote node and sends it with its stacktrace in the exit reason. The caller raises it again. This also applies when the remote node enumerates a stream of
client_postprocessing: the stream raises the exception in the caller.Exits of the serving, such as
:noprocand a crash of the serving process, do not change.Both tests fail on main with an exit.