Spaces:
Running
Running
fix: queue panel showed 12 of 17 models, in alphabetical not run order
Browse filesrenderQueue capped the list at 12 with no overflow hint, and every PENDING row tied in the status sort so the panel fell back to repo file order. The two deep-analysis-research/D2IL models sort last alphabetically and were among the 5 cut — despite being #2 and #3 in the actual run order — which read as 'they were never queued'. Now renders every active row, tie-broken by submitted_time (the field the worker itself orders by), numbered, with a count in the heading.
- index.html +20 -5
index.html
CHANGED
|
@@ -152,6 +152,9 @@ table.board tbody tr:hover td:nth-child(1),table.board tbody tr:hover td:nth-chi
|
|
| 152 |
.panel h3 .k{font:600 11px "IBM Plex Sans";letter-spacing:.06em;color:var(--gold);text-transform:uppercase}
|
| 153 |
.qrow{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed var(--border);font-size:13px}
|
| 154 |
.qrow:last-child{border-bottom:0}
|
|
|
|
|
|
|
|
|
|
| 155 |
.badge{font:600 10.5px "IBM Plex Sans";letter-spacing:.04em;text-transform:uppercase;padding:3px 8px;border-radius:999px}
|
| 156 |
.b-pending{background:rgba(201,154,63,.16);color:var(--gold)}
|
| 157 |
.b-running{background:rgba(16,185,129,.16);color:var(--accent)}
|
|
@@ -253,7 +256,7 @@ footer{margin-top:30px;text-align:center;color:var(--ink-mute);font-size:12px}
|
|
| 253 |
|
| 254 |
<div class="grid2 one">
|
| 255 |
<div class="panel">
|
| 256 |
-
<h3><span class="k">Queue</span> Evaluation status</h3>
|
| 257 |
<div id="queue"><div class="qrow" style="color:var(--ink-mute)">Loading queue…</div></div>
|
| 258 |
</div>
|
| 259 |
</div>
|
|
@@ -504,13 +507,25 @@ function render(){
|
|
| 504 |
function renderQueue(requests){
|
| 505 |
const q=document.getElementById("queue");
|
| 506 |
const active=requests.filter(r=>r&&["PENDING","RUNNING","RERUN","FAILED"].includes((r.status||"").toUpperCase()));
|
| 507 |
-
if(!active.length){
|
|
|
|
|
|
|
| 508 |
const order={RUNNING:0,PENDING:1,RERUN:1,FAILED:2};
|
| 509 |
-
|
| 510 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 511 |
const s=(r.status||"").toUpperCase();
|
| 512 |
const cls=s==="RUNNING"?"b-running":s==="FAILED"?"b-failed":"b-pending";
|
| 513 |
-
return `<div class="qrow"><a href="https://huggingface.co/${r.model}" target="_blank" rel="noopener">${r.model}</a><span class="badge ${cls}">${s}</span></div>`;
|
| 514 |
}).join("");
|
| 515 |
}
|
| 516 |
|
|
|
|
| 152 |
.panel h3 .k{font:600 11px "IBM Plex Sans";letter-spacing:.06em;color:var(--gold);text-transform:uppercase}
|
| 153 |
.qrow{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed var(--border);font-size:13px}
|
| 154 |
.qrow:last-child{border-bottom:0}
|
| 155 |
+
.qcount{float:right;font-family:"IBM Plex Mono";font-size:12px;color:var(--ink-mute);font-weight:400}
|
| 156 |
+
.qnum{font-family:"IBM Plex Mono";font-size:11.5px;color:var(--ink-mute);min-width:22px;text-align:right;flex:0 0 auto}
|
| 157 |
+
.qrow a{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
| 158 |
.badge{font:600 10.5px "IBM Plex Sans";letter-spacing:.04em;text-transform:uppercase;padding:3px 8px;border-radius:999px}
|
| 159 |
.b-pending{background:rgba(201,154,63,.16);color:var(--gold)}
|
| 160 |
.b-running{background:rgba(16,185,129,.16);color:var(--accent)}
|
|
|
|
| 256 |
|
| 257 |
<div class="grid2 one">
|
| 258 |
<div class="panel">
|
| 259 |
+
<h3><span class="k">Queue</span> Evaluation status<span id="queueCount" class="qcount"></span></h3>
|
| 260 |
<div id="queue"><div class="qrow" style="color:var(--ink-mute)">Loading queue…</div></div>
|
| 261 |
</div>
|
| 262 |
</div>
|
|
|
|
| 507 |
function renderQueue(requests){
|
| 508 |
const q=document.getElementById("queue");
|
| 509 |
const active=requests.filter(r=>r&&["PENDING","RUNNING","RERUN","FAILED"].includes((r.status||"").toUpperCase()));
|
| 510 |
+
if(!active.length){
|
| 511 |
+
const c0=document.getElementById("queueCount"); if(c0)c0.textContent="";
|
| 512 |
+
q.innerHTML='<div class="qrow" style="color:var(--ink-mute)">No pending or running evaluations.</div>';return;}
|
| 513 |
const order={RUNNING:0,PENDING:1,RERUN:1,FAILED:2};
|
| 514 |
+
// Within a status group, order by submitted_time — that is precisely how the
|
| 515 |
+
// worker chooses its next job (auto_hf_queue.list_requests sorts oldest-first
|
| 516 |
+
// and next_todo takes todo[0]), so the panel reads as the real run order.
|
| 517 |
+
// Without this tiebreak every PENDING row ties and the list falls back to
|
| 518 |
+
// repo file order, which is alphabetical and tells you nothing.
|
| 519 |
+
active.sort((a,b)=>(order[a.status?.toUpperCase()]??3)-(order[b.status?.toUpperCase()]??3)
|
| 520 |
+
||String(a.submitted_time||"").localeCompare(String(b.submitted_time||"")));
|
| 521 |
+
const cnt=document.getElementById("queueCount");
|
| 522 |
+
if(cnt)cnt.textContent=`${active.length} in queue`;
|
| 523 |
+
// No cap: truncating here once hid 5 of 17 queued models and read as "they
|
| 524 |
+
// were never queued". A long list is better than a silently short one.
|
| 525 |
+
q.innerHTML=active.map((r,i)=>{
|
| 526 |
const s=(r.status||"").toUpperCase();
|
| 527 |
const cls=s==="RUNNING"?"b-running":s==="FAILED"?"b-failed":"b-pending";
|
| 528 |
+
return `<div class="qrow"><span class="qnum">${i+1}</span><a href="https://huggingface.co/${r.model}" target="_blank" rel="noopener" title="${r.model}">${r.model}</a><span class="badge ${cls}">${s}</span></div>`;
|
| 529 |
}).join("");
|
| 530 |
}
|
| 531 |
|