luisrui commited on
Commit
81b18a2
·
1 Parent(s): f86c505

Trim metric dropdown and shorten landing copy

Browse files

Drop strict_accuracy / mc2 / accuracy_norm from the curated metric list
(unfamiliar to most users) and force-include "accuracy" so the default
value actually appears in the dropdown instead of getting filtered out
by the id=0 == unknown_metric_id collision.

Also remove the two filler sentences from the landing markdown — the
status line below the table already explains the modality filter.

Files changed (1) hide show
  1. app.py +6 -13
app.py CHANGED
@@ -30,19 +30,19 @@ print(f"Loaded recommender: {len(RECOMMENDER.model_names)} candidate models, "
30
 
31
  # Sort the dropdown choices for a sane UX.
32
  TASK_CHOICES = sorted(RECOMMENDER.task2id.keys(), key=lambda x: x.lower())
33
- # Metric vocab is huge (3k+) and noisy — restrict to the most common bare metric names.
34
  COMMON_METRICS = [
35
  "accuracy", "f1", "exact_match", "rouge_l", "bleu", "mean_iou",
36
  "mean_average_precision", "top_1_accuracy", "top_5_accuracy",
37
  "perplexity", "wer", "auc", "spearman", "pearson", "mse", "rmse",
38
- "mc2", "accuracy_norm", "strict_accuracy",
39
  ]
40
  # Keep only those actually present in the metric vocab (with loose alias matching).
 
 
41
  METRIC_CHOICES = sorted(
42
- {m for m in COMMON_METRICS if RECOMMENDER.resolve_metric(m) != RECOMMENDER.model.unknown_metric_id}
 
43
  )
44
- if "accuracy" in COMMON_METRICS and not METRIC_CHOICES:
45
- METRIC_CHOICES = COMMON_METRICS # fallback
46
 
47
 
48
  EXAMPLE_DESCRIPTIONS = [
@@ -139,14 +139,7 @@ with gr.Blocks(title="ModelLens · Finding the Best Model for Your Task", theme=
139
  """
140
  # ModelLens: Finding the Best for Your Task from Myriads of Models
141
  Describe your dataset, pick a task type and a metric, and ModelLens returns
142
- the top candidates from a pool of **47k+** HuggingFace models. Backed by the
143
- `MLPMetricFull` checkpoint trained on the cleaned + expanded
144
- `unified_augmented_v2` corpus.
145
-
146
- Results are post-filtered by a modality sanity check so that e.g.
147
- *Image Generation* won't surface text-only LLMs. The status line below
148
- the table shows which capability your task requires and how many
149
- candidates passed the filter.
150
 
151
  > **BYO OpenAI key.** This Space embeds your dataset description with
152
  > `text-embedding-3-small`.
 
30
 
31
  # Sort the dropdown choices for a sane UX.
32
  TASK_CHOICES = sorted(RECOMMENDER.task2id.keys(), key=lambda x: x.lower())
33
+ # Metric vocab is huge (9k+) and noisy — restrict to the most common bare metric names.
34
  COMMON_METRICS = [
35
  "accuracy", "f1", "exact_match", "rouge_l", "bleu", "mean_iou",
36
  "mean_average_precision", "top_1_accuracy", "top_5_accuracy",
37
  "perplexity", "wer", "auc", "spearman", "pearson", "mse", "rmse",
 
38
  ]
39
  # Keep only those actually present in the metric vocab (with loose alias matching).
40
+ # "accuracy" is always kept — it's the canonical default; even when it resolves
41
+ # to the unknown_metric_id sentinel the UNK path is a sensible catchall.
42
  METRIC_CHOICES = sorted(
43
+ {m for m in COMMON_METRICS
44
+ if m == "accuracy" or RECOMMENDER.resolve_metric(m) != RECOMMENDER.model.unknown_metric_id}
45
  )
 
 
46
 
47
 
48
  EXAMPLE_DESCRIPTIONS = [
 
139
  """
140
  # ModelLens: Finding the Best for Your Task from Myriads of Models
141
  Describe your dataset, pick a task type and a metric, and ModelLens returns
142
+ the top candidates from a pool of **47k+** HuggingFace models.
 
 
 
 
 
 
 
143
 
144
  > **BYO OpenAI key.** This Space embeds your dataset description with
145
  > `text-embedding-3-small`.