Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
316f2f5f45 | ||
|
|
574076119c | ||
|
|
3625fdc860 | ||
|
|
a992d4b88f | ||
|
|
c3dfe62cec |
+4
-4
@@ -226,13 +226,13 @@ def gpu_health_score(model):
|
|||||||
h = check_gpu_health(model, sidecar_timeout=1.5, gpu_timeout=1)
|
h = check_gpu_health(model, sidecar_timeout=1.5, gpu_timeout=1)
|
||||||
if h.get("status") == "down":
|
if h.get("status") == "down":
|
||||||
return 999 # never pick down GPUs
|
return 999 # never pick down GPUs
|
||||||
vram_pct = h.get("vram_pct", 50)
|
vram_pct = h.get("vram_pct") or 50
|
||||||
temp_c = h.get("temp_c", 50)
|
temp_c = h.get("temp_c") or 50
|
||||||
active = gpu_active_count(model)
|
active = gpu_active_count(model)
|
||||||
max_c = GPU_MAX_CONCURRENT.get(model, 1)
|
max_c = GPU_MAX_CONCURRENT.get(model, 1)
|
||||||
load_pct = (active / max_c) * 100
|
load_pct = (active / max_c) * 100 if max_c > 0 else 0
|
||||||
# Score: lower = better (more headroom, cooler, less loaded)
|
# Score: lower = better (more headroom, cooler, less loaded)
|
||||||
score = vram_pct * 0.4 + max(temp_c - 30, 0) * 0.3 + load_pct * 0.3
|
score = (vram_pct or 0) * 0.4 + max((temp_c or 50) - 30, 0) * 0.3 + load_pct * 0.3
|
||||||
return score
|
return score
|
||||||
|
|
||||||
def select_best_gpu(candidates, reason, agent=""):
|
def select_best_gpu(candidates, reason, agent=""):
|
||||||
|
|||||||
Reference in New Issue
Block a user