-
Notifications
You must be signed in to change notification settings - Fork 76
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
Implements learned filter cascade #23
Conversation
pgasawa
commented
Oct 28, 2024
- Adds learned filter cascade code from research experiments
- Updates op_examples and github tests for the filter cascade operations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @pgasawa, looks great!
|
||
assert "I am really excited to go to class today!" in filtered_df["Text"].values | ||
assert "I am very sad" not in filtered_df["Text"].values | ||
assert stats["filters_resolved_by_helper_model"] > 0, stats |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a simple question for my own understanding - is assert stats["filters_resolved_by_helper_model"] > 0
ever going to be flaky depending on the large/small model. Or is this super safe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question -- I think achieving >0 helper calls with a .9/.9 targets for this task should be simple enough for language models that I really wouldn't expect it to be flaky. Worst case if it comes to it the line can be removed, though I'd personally be a bit surprised if it failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying, let's keep it then
lotus/sem_ops/cascade_utils.py
Outdated
def importance_sampling( | ||
proxy_scores: list[float], | ||
sample_percentage: float, | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be helpful to have output types here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added for all util funcs in the file!