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

fix: use outerjoin for evals filter #4066

Merged
merged 4 commits into from
Jul 30, 2024
Merged

Conversation

RogerHYang
Copy link
Contributor

@RogerHYang RogerHYang commented Jul 29, 2024

resolves #4017

Caveat

Because filtering is done in SQL, logical negations require additional consideration with respect to NULL values.

For example, the logical negation of

evals["correctness"].score == 1

is actually not

evals["correctness"].score != 1

but it is instead the following

evals["correctness"].score != 1 or evals["correctness"].score is None

This is because NULL != 1 is actually false in SQL.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 29, 2024
@axiomofjoy axiomofjoy self-requested a review July 30, 2024 17:34
Copy link
Contributor

@axiomofjoy axiomofjoy left a comment

Choose a reason for hiding this comment

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

Great job

tests/trace/dsl/test_query.py Outdated Show resolved Hide resolved
tests/trace/dsl/test_query.py Outdated Show resolved Hide resolved
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jul 30, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jul 30, 2024
@RogerHYang RogerHYang merged commit 334a9a9 into main Jul 30, 2024
11 checks passed
@RogerHYang RogerHYang deleted the outerjoin-for-eval-filters branch July 30, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] evals['qa_evaluator'].label is None is not the opposite of evals['qa_evaluator'].label is not None
2 participants