feat: make model age admission-only
This commit is contained in:
@@ -385,6 +385,8 @@ class CandidatePreflightTests(unittest.TestCase):
|
||||
model_profile={"modelType": "qwen3", "quantizationMethod": "awq"},
|
||||
)
|
||||
tracker._records[0]["outcome"] = "failed" # noqa: SLF001
|
||||
tracker._records[0]["failureCategory"] = "model_load" # noqa: SLF001
|
||||
tracker._records[0]["failureScope"] = "model_gpu_framework" # noqa: SLF001
|
||||
report = tracker.get_stats_report()
|
||||
|
||||
key = "gpu|vllm|text-generation|qwen3|awq"
|
||||
@@ -830,8 +832,50 @@ class CandidatePreflightTests(unittest.TestCase):
|
||||
self.assertEqual(1, combo["platformFailureCount"])
|
||||
self.assertEqual(0, profile["consecutiveFailures"])
|
||||
self.assertFalse(tracker.is_model_gpu_failed("owner/model", "gpu"))
|
||||
self.assertEqual([], tracker.get_strategy_history_records())
|
||||
self.assertNotIn("logCosUrl", read_jsonl(path)[0])
|
||||
|
||||
def test_ambiguous_failure_is_unresolved_and_does_not_poison_strategy_feedback(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as temporary_dir:
|
||||
path = Path(temporary_dir) / "outcomes.jsonl"
|
||||
tracker = OutcomeTracker(path)
|
||||
tracker.record_submission(
|
||||
"owner/model",
|
||||
"gpu",
|
||||
"vllm",
|
||||
"text-generation",
|
||||
"task-ambiguous",
|
||||
datetime.now(timezone.utc).isoformat(),
|
||||
)
|
||||
task = {
|
||||
"taskId": "task-ambiguous",
|
||||
"status": "failed",
|
||||
"verifyResult": -1,
|
||||
"logCosUrl": "https://logs.invalid/task-ambiguous.zip",
|
||||
}
|
||||
classification = {
|
||||
"failureCategory": "ambiguous_runtime",
|
||||
"failureScope": "unknown",
|
||||
"failureAction": "offline_review",
|
||||
"failureNeedsLlm": False,
|
||||
}
|
||||
with patch(
|
||||
"outcome_tracker.fetch_and_classify_failure_log",
|
||||
return_value=classification,
|
||||
):
|
||||
tracker.sync_from_api(TaskClient([task])) # type: ignore[arg-type]
|
||||
|
||||
combo = tracker.get_stats_report()["combinationStats"][
|
||||
"gpu|vllm|text-generation"
|
||||
]
|
||||
|
||||
self.assertEqual(1, combo["failureCount"])
|
||||
self.assertEqual(0, combo["attributableFailureCount"])
|
||||
self.assertEqual(0, combo["platformFailureCount"])
|
||||
self.assertEqual(1, combo["unresolvedFailureCount"])
|
||||
self.assertFalse(tracker.is_model_gpu_failed("owner/model", "gpu"))
|
||||
self.assertEqual([], tracker.get_strategy_history_records())
|
||||
|
||||
def test_failed_log_enrichment_attempt_is_persisted_and_bounded(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as temporary_dir:
|
||||
path = Path(temporary_dir) / "outcomes.jsonl"
|
||||
|
||||
Reference in New Issue
Block a user