Use probe sequence bottlenecks in harness
This commit is contained in:
@@ -249,7 +249,10 @@ def _recent_trial_diagnostics(state: StudyState) -> list[dict[str, Any]]:
|
||||
"best_feasible_probe": _compact_probe(best_probe),
|
||||
"last_probe": _compact_probe(last_probe),
|
||||
}
|
||||
item["active_bottleneck"] = _active_bottleneck(best_probe or last_probe)
|
||||
item["active_bottleneck"] = _active_bottleneck_from_probe_sequence(
|
||||
probes,
|
||||
fallback=best_probe or last_probe,
|
||||
)
|
||||
elif result.get("all_infeasible_diagnostics"):
|
||||
diag = result["all_infeasible_diagnostics"]
|
||||
item["probe_summary"] = {"all_infeasible": diag}
|
||||
@@ -345,6 +348,20 @@ def _active_bottleneck(probe: dict[str, Any] | None) -> str:
|
||||
return "admission_or_queueing"
|
||||
|
||||
|
||||
def _active_bottleneck_from_probe_sequence(
|
||||
probes: list[Any],
|
||||
*,
|
||||
fallback: dict[str, Any] | None,
|
||||
) -> str:
|
||||
for probe in reversed(probes):
|
||||
if not isinstance(probe, dict):
|
||||
continue
|
||||
bottleneck = _active_bottleneck(probe)
|
||||
if bottleneck not in {"unknown", "none_obvious"}:
|
||||
return bottleneck
|
||||
return _active_bottleneck(fallback)
|
||||
|
||||
|
||||
def _failure_bottleneck(trial: TrialSummary) -> str:
|
||||
if trial.failure_stage == "engine_launch":
|
||||
return "launch_or_memory"
|
||||
|
||||
Reference in New Issue
Block a user