feat: prioritize proven GPU framework combinations
This commit is contained in:
@@ -153,6 +153,28 @@ class OutcomeTracker:
|
||||
f"{gpu}|{fw}|{tt}": {"targetGpu": gpu, "framework": fw, "taskType": tt, **_summarize(records)}
|
||||
for (gpu, fw, tt), records in combo_groups.items()
|
||||
}
|
||||
recent_combination_stats: dict[str, dict[str, Any]] = {}
|
||||
for (gpu, fw, tt), records in combo_groups.items():
|
||||
recent = sorted(records, key=_outcome_record_timestamp, reverse=True)[:20]
|
||||
consecutive_failures = 0
|
||||
for record in recent:
|
||||
if record.get("outcome") != "failed":
|
||||
break
|
||||
consecutive_failures += 1
|
||||
last_terminal_at = None
|
||||
if recent:
|
||||
last_terminal_at = (
|
||||
parse_datetime(recent[0].get("lastSyncTime"))
|
||||
or parse_datetime(recent[0].get("submitTime"))
|
||||
)
|
||||
recent_combination_stats[f"{gpu}|{fw}|{tt}"] = {
|
||||
"targetGpu": gpu,
|
||||
"framework": fw,
|
||||
"taskType": tt,
|
||||
**_summarize(recent),
|
||||
"consecutiveFailures": consecutive_failures,
|
||||
"lastTerminalAt": last_terminal_at.isoformat() if last_terminal_at else None,
|
||||
}
|
||||
|
||||
warnings: list[str] = []
|
||||
for gpu, summary in gpu_summaries.items():
|
||||
@@ -172,6 +194,7 @@ class OutcomeTracker:
|
||||
"gpuSummaries": gpu_summaries,
|
||||
"frameworkSummaries": framework_summaries,
|
||||
"combinationStats": combination_stats,
|
||||
"recentCombinationStats": recent_combination_stats,
|
||||
"totals": _summarize(terminal),
|
||||
"warnings": warnings,
|
||||
}
|
||||
@@ -275,6 +298,11 @@ def _summarize(records: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
}
|
||||
|
||||
|
||||
def _outcome_record_timestamp(record: dict[str, Any]) -> float:
|
||||
timestamp = parse_datetime(record.get("lastSyncTime")) or parse_datetime(record.get("submitTime"))
|
||||
return timestamp.timestamp() if timestamp else 0.0
|
||||
|
||||
|
||||
def _outcome_record_key(record: dict[str, Any]) -> str:
|
||||
task_id = record.get("taskId")
|
||||
if task_id is not None:
|
||||
|
||||
Reference in New Issue
Block a user