-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[better_errors] Improvements in propagation of debugging info #25916
Merged
Conversation
This file contains 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
gnecula
changed the title
[better_errors] Ensure that arg_names is never None
Improvements in propagation of debugging info
Jan 16, 2025
gnecula
force-pushed
the
debug_info_4
branch
2 times, most recently
from
January 16, 2025 09:23
b9f29b9
to
dfc7490
Compare
gnecula
changed the title
Improvements in propagation of debugging info
[better_errors] Improvements in propagation of debugging info
Jan 16, 2025
gnecula
force-pushed
the
debug_info_4
branch
7 times, most recently
from
January 20, 2025 13:13
29a9f5d
to
688051a
Compare
Added some documentation for `TracingDebugInfo` (docstring, comments about `arg_names`, since it was not obvious to me that this would flatten the non-static arguments). Laying the ground for the unification of the old `api_util.debug_info` and `partial_eval.tracing_debug_info`: we rename the former to `api_util.tracing_debug_info`, we push inside the calls to `fun_sourceinfo` and `fun_signature` (which were done by the callers until now), and we rewrite the latter in terms of the former. We leave for a future PR the actual replacing of the latter with the former throughout. In the process of above, cleaned up the one case when `partial_eval.tracing_debug_info` received None for the `in_tree` and `out_tracer_thunk`. The function contained catch-all exception clauses to handle those, but doing so it masked other places where we fail to collect debug info due to programming mistakes. E.g., in one place we passed a `WrappedFun` instead of a `Callable`, resulting in missing debugging info. Added more type declarations. Added a `state_test` with a failure to track debugging information, manifested with a leaked tracer without function provenance. Fixing this in a subsequent PR.
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 20, 2025
Following #25916 there were a few TODOs left in the code to remove api_util.debug_info and replace the one remaining use with api_util.tracing_debug_info. PiperOrigin-RevId: 717523621
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 20, 2025
Following #25916 there were a few TODOs left in the code to remove api_util.debug_info and replace the one remaining use with api_util.tracing_debug_info. PiperOrigin-RevId: 717523621
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 20, 2025
Following #25916 there were a few TODOs left in the code to remove api_util.debug_info and replace the one remaining use with api_util.tracing_debug_info. PiperOrigin-RevId: 717523621
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 20, 2025
Following #25916 there were a few TODOs left in the code to remove api_util.debug_info and replace the one remaining use with api_util.tracing_debug_info. PiperOrigin-RevId: 717523621
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 20, 2025
Following #25916 there were a few TODOs left in the code to remove api_util.debug_info and replace the one remaining use with api_util.tracing_debug_info. PiperOrigin-RevId: 717523621
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 20, 2025
Following #25916 there were a few TODOs left in the code to remove api_util.debug_info and replace the one remaining use with api_util.tracing_debug_info. PiperOrigin-RevId: 717523621
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 20, 2025
Following #25916 there were a few TODOs left in the code to remove api_util.debug_info and replace the one remaining use with api_util.tracing_debug_info. PiperOrigin-RevId: 717523621
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 20, 2025
Following #25916 there were a few TODOs left in the code to remove api_util.debug_info and replace the one remaining use with api_util.tracing_debug_info. PiperOrigin-RevId: 717523621
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 20, 2025
Following #25916 there were a few TODOs left in the code to remove api_util.debug_info and replace the one remaining use with api_util.tracing_debug_info. PiperOrigin-RevId: 717583667
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.
Added some documentation for
TracingDebugInfo
(docstring, commentsabout
arg_names
, since it was not obvious to me that this wouldflatten the non-static arguments).
Laying the ground for the unification of the old
api_util.debug_info
and
partial_eval.tracing_debug_info
: we rename the former toapi_util.tracing_debug_info
, we push inside the calls tofun_sourceinfo
andfun_signature
(which were done by the callersuntil now), and we rewrite the latter in terms
of the former. We leave for a future PR the actual replacing of the
latter with the former throughout.
In the process of above, cleaned up the one case when
partial_eval.tracing_debug_info
received None for the
in_tree
andout_tracer_thunk
. The function containedcatch-all exception clauses to handle those, but doing so it masked other places
where we fail to collect debug info due to programming mistakes. E.g., in
one place we passed a
WrappedFun
instead of aCallable
, resulting in missing debugging info.Added more type declarations.
Added a
state_test
with a failure to track debugging information, manifestedwith a leaked tracer without function provenance. Fixing this in a subsequent PR.