Spaces:
Running
Running
| from inferscale.reports import generate_research_report | |
| def test_report_contains_guardrails_and_ranking(): | |
| robust = { | |
| "repetitions": 4, | |
| "bootstrap_samples": 100, | |
| "robust_winner": "Top-1 decayed", | |
| "nominal_winner_first_seed": "Utility-aware multi-step", | |
| "policies": [ | |
| { | |
| "robust_rank": 1, | |
| "label": "Top-1 decayed", | |
| "median_ttft_ms": 100, | |
| "ttft_ci95_low_ms": 95, | |
| "ttft_ci95_high_ms": 105, | |
| "ttft_win_rate": 0.75, | |
| "pareto_stability": 1.0, | |
| "median_oracle_regret_ms": 3, | |
| "worst_seed_ttft_ms": 120, | |
| } | |
| ], | |
| "oracle": {"candidate_count_per_seed": 19, "median_ttft_ms": 97, "definition": "bounded", "note": "bounded note"}, | |
| } | |
| text = generate_research_report(robust) | |
| assert "# InferScale Research Consolidation" in text | |
| assert "Robust winner" in text | |
| assert "globally optimal" in text | |