Closed erick-xanadu closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.97%. Comparing base (
4018d04
) to head (f5c36c4
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The PR does more than what it says it does: Nice identifiers for callbacks. This makes it difficult to actually focus on the relevant changes, and even harder to evaluate the additions.
@rauletorresc all these changes were necessary for the nice identifiers. Otherwise the __name__
field would be different. It may have been closure
or wrapper
. Depending on the closure that was sent as a callback.
@rauletorresc all these changes were necessary for the nice identifiers. Otherwise the
__name__
field would be different. It may have beenclosure
orwrapper
. Depending on the closure that was sent as a callback.
I understand they are necessary but having them in separated PRs would have eased the review for me. All fine!
For example: "made AnnotatedFunction class to avoid using many closures" would be a good candidate for a PR.
LGTM!
Context: Instead of a numeric identifier, callbacks now include the python attribute
__name__
in their IR.Description of the Change: Cleaning up a little bit of code, made AnnotatedFunction class to avoid using many closures, used
functools.wraps
andfunctools.update_wrapper
where necessary. As an important note, we do not use the__module__
key inwraps
norupdate_wrapper
. Otherwise, autograph would transform the functions returned from callbacks leading to errors.Benefits: Easier debugging in the IR.
Possible Drawbacks: None.
Related GitHub Issues:
[sc-68128]