Merged
Conversation
Fixed issue where responses that cannot be split fails
Contributor
There was a problem hiding this comment.
❌ Changes requested. Reviewed everything up to 6809468 in 1 minute and 17 seconds
More details
- Looked at
14lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0drafted comments based on config settings.
Workflow ID: wflow_d2sRnvEeJc2MECjN
Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
| score = float("yes" in score_txt.lower()) | ||
| except ValueError: | ||
| score = float("yes" in score_txt.lower()) | ||
| score = float("yes" in response.lower()) |
Contributor
There was a problem hiding this comment.
The conversion of the boolean expression to a float is incorrect. It should be converted to an integer since the score is expected to be either 0 or 1 based on the presence of 'yes'.
Suggested change
| score = float("yes" in response.lower()) | |
| score = int('yes' in response.lower()) |
Contributor
There was a problem hiding this comment.
Not correct - we want float in this case.
Contributor
|
@kelvinchanwh Thanks for the quick fixes! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed issue #71 where responses that cannot be split fails
Summary:
Fixes a response handling error in
LLMBasedFaithfulnessby updating the exception handling to process the entire response if it cannot be split.Key points:
ValueErrorinLLMBasedFaithfulnessclass when response splitting failscontinuous_eval/metrics/generation/text/llm_based.pyGenerated with ❤️ by ellipsis.dev