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

Support prediction regex match by setting the operator as a postproce… #792

Merged
merged 3 commits into from
May 7, 2024

Conversation

antonpibm
Copy link
Collaborator

This PR adds the ability to extract parts of the predictions with regex and compare them with a reference
The regex extraction only applies for the prediction
The to_list_by_comma only happens for the refernce
Adding the Jaccard index for comparing the two groups

After the regex processor is added it can be configured, example: processors.prediction_regex_parser[regex=\d+]

Copy link
Member

@elronbandel elronbandel left a comment

Choose a reason for hiding this comment

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

Great contribution @antonpibm !

Copy link

codecov bot commented May 5, 2024

Codecov Report

Attention: Patch coverage is 46.15385% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 92.03%. Comparing base (5783d76) to head (31c4d7b).
Report is 33 commits behind head on main.

Files Patch % Lines
src/unitxt/metrics.py 46.15% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
+ Coverage   91.48%   92.03%   +0.55%     
==========================================
  Files         100      103       +3     
  Lines       10169    10562     +393     
==========================================
+ Hits         9303     9721     +418     
+ Misses        866      841      -25     

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

…ssor

Signed-off-by: antonp@il.ibm.com <antonp@il.ibm.com>
@elronbandel elronbandel merged commit 17f6f3c into IBM:main May 7, 2024
8 of 9 checks passed
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