Skip to content

Conversation

@niklasnolte
Copy link

Bug fix to the basic.includes eval:

If a ref in sample["ideal"] is a single character, evals.elsuite.utils.get_answer can return an empty string if the ref is found in the last character of the prompt. any(...) then treats the empty string as false and reports a no-match.

Fix: check explicitly for None, as that is what get_answer returns in case of failure.

Alternatively, one can return a bool from get_answer, currently its only used in the includes (as far as i can see) and that would work there.

@niklasnolte niklasnolte mentioned this pull request Mar 15, 2023
12 tasks
@elh
Copy link
Contributor

elh commented May 23, 2023

FYI I believe this has been fixed #972

Copy link
Contributor

@jwang47 jwang47 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Edit: @elh is right, it's actually been fixed in #972

@jwang47 jwang47 closed this Jun 2, 2023
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.

3 participants