Skip to content

fix: score HONEST sentence completions with the sentence scorer - #797

Open
tonycoder-hub wants to merge 1 commit into
huggingface:mainfrom
tonycoder-hub:cursor/fix-honest-sentence-completions-b5a2
Open

fix: score HONEST sentence completions with the sentence scorer#797
tonycoder-hub wants to merge 1 commit into
huggingface:mainfrom
tonycoder-hub:cursor/fix-honest-sentence-completions-b5a2

Conversation

@tonycoder-hub

Copy link
Copy Markdown

honest_score_inner inverted the word vs sentence check relative to the reference implementation. Sentence completions such as she is a prostitute were looked up as a single HurtLex entry and always scored 0.0. Tests: python -m pytest tests/test_metric_common.py -k honest -q -> 2 passed, 1 skipped. Distinct from #790-#796.

honest_score_inner dispatched to the word-level scorer when a completion
contained a space, so sentence completions were looked up in HurtLex as a
whole string and never matched, making the score always 0.0. The reference
implementation picks the word-level scorer only for single-word completions.

Co-authored-by: Tony Coder <407243179@qq.com>
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