Skip to content

Commit 9dc3a2a

Browse files
author
Dylan Huang
committed
Add note to test_word_count_evaluate function explaining its purpose and limitations
1 parent 2616f61 commit 9dc3a2a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/pytest/test_pytest_word_count_example.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ def test_word_count_evaluate(row: EvaluationRow) -> EvaluationRow:
1919
"""
2020
Pointwise word count evaluator - just the core evaluation logic.
2121
Everything else (models, datasets, thresholds) is parameterized in the decorator.
22+
23+
NOTE: This function does not make any sense since it just counts the number
24+
of words in the last message and computes some haiku analysis but only uses
25+
the word count to compute the score. But tests/shows how to write a
26+
pointwise evaluation function.
2227
"""
2328
if not row.messages:
2429
return EvaluateResult(score=0.0, reason="No messages found", is_score_valid=False)

0 commit comments

Comments
 (0)