mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-08-30 22:50:46 +02:00
fix(eval): score full anchored completions
This commit is contained in:
@@ -118,6 +118,14 @@ class TestCoherenceScoring:
|
||||
def test_accepts_relevant_completion(self, prompt, completion):
|
||||
assert _is_coherent_completion(prompt, completion) is True
|
||||
|
||||
def test_accepts_concise_anchored_completion(self):
|
||||
assert _is_coherent_completion("The capital of France is", "Paris") is True
|
||||
|
||||
def test_scores_anchors_after_log_preview_boundary(self):
|
||||
completion = "The exact defined value follows. " + ("context " * 30) + "299,792,458 m/s"
|
||||
assert len(completion) > 200
|
||||
assert _is_coherent_completion("The speed of light in a vacuum is", completion) is True
|
||||
|
||||
def test_rejects_fluent_but_irrelevant_completion(self):
|
||||
assert _is_coherent_completion(
|
||||
"The capital of France is",
|
||||
@@ -305,6 +313,7 @@ class TestPipelineInit:
|
||||
pipeline._enforce_generation_guardrails(coherence, degenerate)
|
||||
|
||||
assert exc_info.value.metric == metric
|
||||
assert pipeline._quality_metrics["coherence_degenerate_fraction"] == degenerate
|
||||
|
||||
def test_cancellation_is_terminal_and_cleanup_unloads_model(self):
|
||||
from threading import Event
|
||||
|
||||
Reference in New Issue
Block a user