fix: restore accuracy-first route admission
This commit is contained in:
@@ -344,6 +344,17 @@ class OutcomeTracker:
|
||||
self._by_model_gpu[(model_id, target_gpu)].append(record)
|
||||
append_jsonl(self.path, record)
|
||||
|
||||
def pending_route_count_for_model(self, model_id: str) -> int:
|
||||
"""Return distinct locally submitted GPU routes still awaiting an outcome."""
|
||||
pending_gpus: set[str] = set()
|
||||
for record in self._records:
|
||||
if record.get("modelId") != model_id or record.get("outcome") != "pending":
|
||||
continue
|
||||
target_gpu = str(record.get("targetGpu") or "").strip()
|
||||
if target_gpu:
|
||||
pending_gpus.add(target_gpu)
|
||||
return len(pending_gpus)
|
||||
|
||||
def mark_policy_cancellations(self, decisions: list[dict[str, Any]]) -> int:
|
||||
"""Persist intentional task stops so they never become failure evidence."""
|
||||
marked = 0
|
||||
|
||||
Reference in New Issue
Block a user