Skip to content
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

transformations: (apply-individual-rewrite) give more context in error message [NFC] #3602

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

superlopuh
Copy link
Member

Helps debug

@superlopuh superlopuh added the misc Miscellaneous label Dec 9, 2024
@superlopuh superlopuh self-assigned this Dec 9, 2024
@superlopuh superlopuh merged commit 4b51d2b into main Dec 9, 2024
5 checks passed
@superlopuh superlopuh deleted the sasha/interactive/better-message branch December 9, 2024 11:51
@@ -124,4 +124,6 @@ def apply(self, ctx: MLContext, op: ModuleOp) -> None:

pattern.match_and_rewrite(matched_operation, rewriter)
if not rewriter.has_done_action:
raise ValueError("Invalid rewrite at current location.")
raise ValueError(
f"Invalid rewrite ({pattern}) for operation ({matched_operation}) at location {self.matched_operation_index}."
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was too quick to approve, this should probably use self.pattern_name

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.38%. Comparing base (2c09db8) to head (4b4d4da).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3602   +/-   ##
=======================================
  Coverage   90.38%   90.38%           
=======================================
  Files         469      469           
  Lines       59071    59071           
  Branches     5615     5615           
=======================================
  Hits        53393    53393           
  Misses       4232     4232           
  Partials     1446     1446           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
misc Miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants