dacorvo HF Staff commited on
Commit
b1f5be9
·
verified ·
1 Parent(s): 670e27a

List only the selected models under selected

Browse files
Files changed (2) hide show
  1. README.md +3 -2
  2. app.js +8 -2
README.md CHANGED
@@ -12,5 +12,6 @@ datasets:
12
 
13
  Lists the models of the
14
  [aws-neuron/torch-neuronx-model-support](https://huggingface.co/datasets/aws-neuron/torch-neuronx-model-support)
15
- dataset, by library and `(neuronx-cc, library version)` pair, in the order the
16
- sweep selected them or by their trending score or downloads on the Hub.
 
 
12
 
13
  Lists the models of the
14
  [aws-neuron/torch-neuronx-model-support](https://huggingface.co/datasets/aws-neuron/torch-neuronx-model-support)
15
+ dataset, by library and `(neuronx-cc, library version)` pair: the ones the
16
+ latest sweep selected, in its order, or all of them by their trending score or
17
+ downloads on the Hub.
app.js CHANGED
@@ -164,13 +164,19 @@ async function renderPanel() {
164
  const task = (run) => stats.get(run.model_id).task;
165
  const renderResults = () => {
166
  const order = {
167
- selected: (a, b) => (rank.get(a.model_id) ?? Infinity) - (rank.get(b.model_id) ?? Infinity),
168
  trending: (a, b) => stats.get(b.model_id).trending - stats.get(a.model_id).trending
169
  || stats.get(b.model_id).downloads - stats.get(a.model_id).downloads,
170
  downloads: (a, b) => stats.get(b.model_id).downloads - stats.get(a.model_id).downloads,
171
  }[s.order];
172
- const shown = runs.filter((run) => !s.hiddenTasks.has(task(run)))
 
173
  .sort((a, b) => order(a, b) || a.model_id.localeCompare(b.model_id) || a.tp - b.tp);
 
 
 
 
 
174
  const counts = new Map();
175
  for (const run of shown) counts.set(run.result, (counts.get(run.result) ?? 0) + 1);
176
  const failures = [...counts].filter(([result]) => result !== "PASS").sort(([a], [b]) => a.localeCompare(b));
 
164
  const task = (run) => stats.get(run.model_id).task;
165
  const renderResults = () => {
166
  const order = {
167
+ selected: (a, b) => rank.get(a.model_id) - rank.get(b.model_id),
168
  trending: (a, b) => stats.get(b.model_id).trending - stats.get(a.model_id).trending
169
  || stats.get(b.model_id).downloads - stats.get(a.model_id).downloads,
170
  downloads: (a, b) => stats.get(b.model_id).downloads - stats.get(a.model_id).downloads,
171
  }[s.order];
172
+ const matching = runs.filter((run) => !s.hiddenTasks.has(task(run)));
173
+ const shown = (s.order === "selected" ? matching.filter((run) => rank.has(run.model_id)) : matching)
174
  .sort((a, b) => order(a, b) || a.model_id.localeCompare(b.model_id) || a.tp - b.tp);
175
+ if (!shown.length) {
176
+ results.replaceChildren(h("p", { class: "status" }, matching.length
177
+ ? "None of these models is in the latest selection." : "No model matches the ticked tasks."));
178
+ return;
179
+ }
180
  const counts = new Map();
181
  for (const run of shown) counts.set(run.result, (counts.get(run.result) ?? 0) + 1);
182
  const failures = [...counts].filter(([result]) => result !== "PASS").sort(([a], [b]) => a.localeCompare(b));