Preserve FunctionError semantics while surfacing child tracebacks#547
Open
Preserve FunctionError semantics while surfacing child tracebacks#547
Conversation
eabatalov
reviewed
Mar 4, 2026
| uploaded_request_error_blob=uploaded_output_blob, | ||
| ) | ||
| except BaseException as e: | ||
| # For child function calls (created by SDK), forward traceback via |
Contributor
There was a problem hiding this comment.
Don't copy-paste the logic here, reuse logic in except RequestError as e: branch.
eabatalov
reviewed
Mar 4, 2026
| except BaseException as e: | ||
| # For child function calls (created by SDK), forward traceback via | ||
| # request_error_output while preserving FUNCTION_ERROR semantics. | ||
| if ( |
Contributor
There was a problem hiding this comment.
This if looks redundant and obscure.
eabatalov
reviewed
Mar 4, 2026
| request_error_message: str = serialized_request_error.data.decode( | ||
| "utf-8" | ||
| ) | ||
| if request_error_message.startswith( |
Contributor
There was a problem hiding this comment.
Update FE proto comments to change and explain new request_error field its semantic.
eabatalov
requested changes
Mar 4, 2026
Contributor
eabatalov
left a comment
There was a problem hiding this comment.
Not clear what we're achieving with this change. We'll discuss this outside of this PR.
Besides the other comments, the gaps in this PR:
- Not implemented for LocalRunner.
- No tests that validate that backtraces are now present in FunctionError. The existing local runner test needs to get updated for the new UX, see test_original_function_exception_is_pretty_printed_in_local_mode and the same test needs be added for remote mode.
Contributor
Author
|
Leaving this open so I can understand the comments |
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.
Summary
RequestErrorand runtimeFunctionErrorrequest_error_outputwith an internal marker and reconstruct them intoFunctionErroron the parent sideDetails
RequestError, FE now uploads traceback text with a private prefix markerALLOCATION_FAILURE_REASON_FUNCTION_ERRORfor these runtime failurescreate_function_error(..., cause=traceback)RequestErrorpaths are unchanged and remainRequestErrorValidation
python3 -m py_compile src/tensorlake/function_executor/allocation_runner/allocation_runner.py