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

Generalize trusted function framework to be a hook framework #278

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

yuxincs
Copy link
Contributor

@yuxincs yuxincs commented Sep 13, 2024

This PR generalizes the trusted function framework to be a NilAway-wide hook framework.

To be honest it was already a NilAway-wide thing: it hooks into different parts of the system and can do different actions based on certain conditions. This PR simply lifts it up to the root level and call it "hook" instead of trusted function: in the future we may leverage this framework to handle more than function calls, with more types of actions, and hooking into more points (e.g., even in inference).

This PR is the first of a series of PRs to generalize this framework: this one simply does the relocation with no changes other than reference updates.

@yuxincs yuxincs marked this pull request as ready for review September 13, 2024 03:05
Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.60%. Comparing base (c91e71c) to head (6884546).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #278   +/-   ##
=======================================
  Coverage   87.60%   87.60%           
=======================================
  Files          63       63           
  Lines        7916     7916           
=======================================
  Hits         6935     6935           
  Misses        799      799           
  Partials      182      182           

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

Copy link

github-actions bot commented Sep 13, 2024

Golden Test

Note

✅ NilAway errors reported on standard libraries are identical.

3271 errors on base branch (main, c91e71c)
3271 errors on test branch (3ce6698)

Copy link
Contributor

@sonalmahajan15 sonalmahajan15 left a comment

Choose a reason for hiding this comment

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

Like the refactoring!

@yuxincs yuxincs merged commit c59c3f4 into main Oct 4, 2024
9 checks passed
@yuxincs yuxincs deleted the yuxincs/generalize-hook branch October 4, 2024 21:06
yuxincs added a commit that referenced this pull request Oct 5, 2024
We do not really have custom nilable types for a really long time now,
so it makes sense to remove the dead code.

If we ever want to add such custom nilable types again, we should
consider adding a hook here via the hook framework (#278).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants