josefchen commited on
Commit
430599e
·
verified ·
1 Parent(s): 8507864

Clarify Fable refusal diagnostics

Browse files
app.py CHANGED
@@ -206,7 +206,7 @@ body, .gradio-container {
206
  .fb-section p { color: var(--fb-muted); margin: 0; max-width: 70ch; }
207
  .fb-metric-grid {
208
  display: grid;
209
- grid-template-columns: repeat(4, 1fr);
210
  gap: 12px;
211
  margin: 8px 0 16px;
212
  }
@@ -330,6 +330,37 @@ TASK_LABEL_TO_ID = {
330
  }
331
 
332
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  def _short(value: str) -> str:
334
  return (
335
  value.replace("GPT-5.6 ", "5.6 ")
@@ -415,20 +446,41 @@ def _leaderboard_frame() -> pd.DataFrame:
415
 
416
  def _model_detail(model_name: str) -> tuple[str, pd.DataFrame]:
417
  model = MODEL_BY_NAME[model_name]
 
418
  repeat = model.get("repeatability") or {}
419
  rank_interval = model.get("bootstrap_rank_95_interval") or [None, None]
 
 
 
 
 
 
 
 
 
 
420
  summary = f"""
421
  <div class="fb-metric-grid">
422
  <div class="fb-metric"><small>FlavourBench Score</small><strong>{model["flavourbench_score"]:.2f}</strong></div>
 
 
423
  <div class="fb-metric"><small>Statistical group</small><strong>G{model.get("statistical_rank_group") or "-"}</strong></div>
424
  <div class="fb-metric"><small>Bootstrap rank</small><strong>{rank_interval[0]}-{rank_interval[1]}</strong></div>
425
  <div class="fb-metric"><small>Repeat Jaccard</small><strong>{float(repeat.get("mean_ingredient_set_jaccard", 0)):.3f}</strong></div>
426
  </div>
 
427
  """
428
  family_rows = [
429
  {
430
  "Family": family.replace("_", " ").title(),
431
- "Score": round(float(score), 3),
 
 
 
 
 
 
 
432
  }
433
  for family, score in model["family_scores"].items()
434
  ]
@@ -436,7 +488,9 @@ def _model_detail(model_name: str) -> tuple[str, pd.DataFrame]:
436
  family_rows.append(
437
  {
438
  "Family": "Exact chance baseline",
439
- "Score": round(float(chance["exact_chance_score"]), 3),
 
 
440
  }
441
  )
442
  return summary, pd.DataFrame(family_rows)
 
206
  .fb-section p { color: var(--fb-muted); margin: 0; max-width: 70ch; }
207
  .fb-metric-grid {
208
  display: grid;
209
+ grid-template-columns: repeat(3, 1fr);
210
  gap: 12px;
211
  margin: 8px 0 16px;
212
  }
 
330
  }
331
 
332
 
333
+ def _completion_diagnostic(model_id: str) -> dict[str, Any]:
334
+ family_rows: dict[str, list[dict[str, Any]]] = {}
335
+ for task_id, task in TASK_BY_ID.items():
336
+ family = str(task["family"])
337
+ family_rows.setdefault(family, []).append(OBSERVATIONS[(model_id, task_id)])
338
+ conditional_family_scores: dict[str, float] = {}
339
+ completed_by_family: dict[str, int] = {}
340
+ scheduled_by_family: dict[str, int] = {}
341
+ for family, rows in family_rows.items():
342
+ completed = [row for row in rows if row["status"] == "completed"]
343
+ scheduled_by_family[family] = len(rows)
344
+ completed_by_family[family] = len(completed)
345
+ conditional_family_scores[family] = (
346
+ sum(float(row["scoring"]["score"]) for row in completed) / len(completed)
347
+ if completed
348
+ else 0.0
349
+ )
350
+ completed = sum(completed_by_family.values())
351
+ return {
352
+ "scheduled": len(TASK_BY_ID),
353
+ "completed": completed,
354
+ "failed": len(TASK_BY_ID) - completed,
355
+ "completion_rate": completed / len(TASK_BY_ID),
356
+ "conditional_family_scores": conditional_family_scores,
357
+ "completed_by_family": completed_by_family,
358
+ "scheduled_by_family": scheduled_by_family,
359
+ "conditional_equal_family_score": sum(conditional_family_scores.values())
360
+ / len(conditional_family_scores),
361
+ }
362
+
363
+
364
  def _short(value: str) -> str:
365
  return (
366
  value.replace("GPT-5.6 ", "5.6 ")
 
446
 
447
  def _model_detail(model_name: str) -> tuple[str, pd.DataFrame]:
448
  model = MODEL_BY_NAME[model_name]
449
+ diagnostic = _completion_diagnostic(str(model["model_id"]))
450
  repeat = model.get("repeatability") or {}
451
  rank_interval = model.get("bootstrap_rank_95_interval") or [None, None]
452
+ eligibility_note = ""
453
+ if not model.get("eligible"):
454
+ eligibility_note = f"""
455
+ <div class="fb-evidence">
456
+ <strong>DNF is an availability result, not a bottom-place capability rank.</strong>
457
+ {diagnostic["failed"]} of {diagnostic["scheduled"]} primary cells did not complete and
458
+ remain zero in the official score. The completed-only equal-family value is descriptive
459
+ only: failures are not missing at random, so it must not be ranked against official scores.
460
+ </div>
461
+ """
462
  summary = f"""
463
  <div class="fb-metric-grid">
464
  <div class="fb-metric"><small>FlavourBench Score</small><strong>{model["flavourbench_score"]:.2f}</strong></div>
465
+ <div class="fb-metric"><small>Completed-only*</small><strong>{diagnostic["conditional_equal_family_score"]:.2f}</strong></div>
466
+ <div class="fb-metric"><small>Completion</small><strong>{diagnostic["completed"]}/{diagnostic["scheduled"]}</strong></div>
467
  <div class="fb-metric"><small>Statistical group</small><strong>G{model.get("statistical_rank_group") or "-"}</strong></div>
468
  <div class="fb-metric"><small>Bootstrap rank</small><strong>{rank_interval[0]}-{rank_interval[1]}</strong></div>
469
  <div class="fb-metric"><small>Repeat Jaccard</small><strong>{float(repeat.get("mean_ingredient_set_jaccard", 0)):.3f}</strong></div>
470
  </div>
471
+ {eligibility_note}
472
  """
473
  family_rows = [
474
  {
475
  "Family": family.replace("_", " ").title(),
476
+ "Official score": round(float(score), 3),
477
+ "Completed": (
478
+ f"{diagnostic['completed_by_family'].get(family, 0)}/"
479
+ f"{diagnostic['scheduled_by_family'].get(family, 0)}"
480
+ ),
481
+ "Completed-only*": round(
482
+ float(diagnostic["conditional_family_scores"].get(family, 0.0)), 3
483
+ ),
484
  }
485
  for family, score in model["family_scores"].items()
486
  ]
 
488
  family_rows.append(
489
  {
490
  "Family": "Exact chance baseline",
491
+ "Official score": round(float(chance["exact_chance_score"]), 3),
492
+ "Completed": "—",
493
+ "Completed-only*": "—",
494
  }
495
  )
496
  return summary, pd.DataFrame(family_rows)
data-powered/flavourbench-powered-space.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:81c2a54364763408383818060ffd1dd96f3f59fd0df2e04872beecabcf9a9493
3
  size 14217610
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b6683a9e6bc11b31f868ba487b2faa14de3fd87600149d4422f66c25660591e
3
  size 14217610