Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

Conversation

@dbieber
Copy link
Contributor

@dbieber dbieber commented Nov 10, 2021

  1. Updates localization ("raise contribution") calculation to handle try/except blocks.

If an exception is caught by a try/except block, but (via normal execution and branch decisions) the exception still finds its way to the exception node, the original node that raised gets credit.
If another exception is raised, the new exception gets credit.

  1. tests for get_nodes_at_lineno
  2. Fix for target_lineno when docstring is included in source
  3. New dataset (FULL_DATASET_PATH_WITH_DOCSTRINGS) using appropriate target_linenos and corresponding node indexes.
  4. test_compute_localization_accuracy

@dbieber dbieber changed the title Raise attributions support try/except Exception IPA-GNN localization (aka raise attributions) support try/except Nov 17, 2021
@dbieber dbieber requested a review from dan-zheng November 19, 2021 16:35
Copy link
Contributor

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the PR description!

"""
raw = process.make_rawruntimeerrorproblem(
source, target, lineno)
print(raw)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to delete this print statement? There are more in the file below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, forgot to push the latest commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(In which that's the only change)

@dbieber dbieber merged commit a0c3384 into main Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants