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

Allow filtering samples by compound expressions including multiple scorers #911

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

amatveiakin
Copy link

Allow filtering samples by compound expressions like result == "C" and steps <= 10.

  • Expression parsing via filtrex library. Supports arithmetic, basic math functions, Python-style boolean operations, chained comparisons.
  • The filter expression can include any scorer, not just the selected one.
  • Clicking on a score adds it to the filter. Moreover, for simple categorical scores the UI will automatically suggest expressions like result == "C".

Auxiliary changes:

  • Merged scorer and score selectors. Strictly speaking, this was not necessary to unblock this change. I thought it made sense because I made the filter field wider, so the tools panel is now more prone to overflowing. But we can revert if needed.
  • Moved filter and scorers to the right so that they are nicely aligned.
  • Made scorer list collision-proof. Now if two scorers define scores with the same name, the scorers panel will use dot notation to disambiguate, e.g. score.foo vs other_score.foo.
  • Implementation detail: Split SamplesDescriptor into SamplesDescriptor (depends on the current scorer) and EvalDescriptor (does not depend on the scorer).

Next steps:

  • This UI allows extending filter expressions without adding visual clutter. I would like to eventually allow filtering by sample metadata and full-text search over the transcript.
  • Consider if the tool order could be improved. I find it a little confusing that the filter is to the right of the scorer selector, yet does not depend on it. Not sure how best to fix this, because I want to keep the filter aligned with the scorer list.

Screenshot 2024-11-28 001731
Screenshot 2024-11-28 001800

@dragonstyle
Copy link
Collaborator

Thank you for this! It's a holiday for the next couple of days in the USA so I'll really dig into this on Monday!

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