Gate GMU climb on measured improvement
This commit is contained in:
@@ -1590,6 +1590,7 @@ def _runtime_candidate_actions(
|
||||
study,
|
||||
anchor_flags,
|
||||
recent_diagnostics,
|
||||
anchor_rate_per_gpu=_profile_request_rate_per_gpu(anchor),
|
||||
)
|
||||
if target is not None:
|
||||
patch = {**runtime_base_patch, "gpu-memory-utilization": target}
|
||||
@@ -1629,6 +1630,8 @@ def _next_gpu_memory_utilization_target(
|
||||
study: StudySpec,
|
||||
anchor_flags: dict[str, Any],
|
||||
recent_diagnostics: list[dict[str, Any]],
|
||||
*,
|
||||
anchor_rate_per_gpu: float = 0.0,
|
||||
) -> float | None:
|
||||
current_gmu = _parse_float_like(
|
||||
anchor_flags.get("gpu-memory-utilization"), default=0.9
|
||||
@@ -1651,8 +1654,14 @@ def _next_gpu_memory_utilization_target(
|
||||
gmu = _parse_float_like(flag_patch.get("gpu-memory-utilization"), default=0.0)
|
||||
if gmu <= 0:
|
||||
continue
|
||||
if abs(gmu - current_gmu) <= EPSILON:
|
||||
continue
|
||||
if item.get("status") == "completed":
|
||||
successful_gmus.append(gmu)
|
||||
rate = _as_float(item.get("best_request_rate_per_gpu"))
|
||||
if anchor_rate_per_gpu > 0 and rate <= anchor_rate_per_gpu + EPSILON:
|
||||
failed_gmus.append(gmu)
|
||||
else:
|
||||
successful_gmus.append(gmu)
|
||||
elif item.get("status") == "failed":
|
||||
failed_gmus.append(gmu)
|
||||
climb_from = max(successful_gmus)
|
||||
@@ -1668,6 +1677,13 @@ def _next_gpu_memory_utilization_target(
|
||||
return target
|
||||
|
||||
|
||||
def _profile_request_rate_per_gpu(profile: dict[str, Any]) -> float:
|
||||
performance = profile.get("performance")
|
||||
if isinstance(performance, dict):
|
||||
return _as_float(performance.get("best_request_rate_per_gpu"))
|
||||
return _as_float(profile.get("best_request_rate_per_gpu"))
|
||||
|
||||
|
||||
def _prefill_scheduler_candidate_actions(
|
||||
study: StudySpec,
|
||||
window_summary: dict[str, Any],
|
||||
|
||||
Reference in New Issue
Block a user