junaid-simamdigital commited on
Commit
e13f7f2
·
verified ·
1 Parent(s): 2c0abbc

Add reproducible run manifest summarizer

Browse files
Files changed (1) hide show
  1. tests/test_summarize_runs.py +25 -0
tests/test_summarize_runs.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from summarize_runs import summarize_manifest
2
+
3
+
4
+ def test_summarize_manifest_extracts_comparable_quality_signals():
5
+ manifest = {
6
+ "run_id": "abc",
7
+ "backend": "Depth Anything V2",
8
+ "runtime": "CPU",
9
+ "view_count": 2,
10
+ "claims": {"generated_novel_views": False},
11
+ "metrics": {
12
+ "fused_point_count": 12,
13
+ "projection_coverage": [0.5, 1.0],
14
+ "reprojection_consistency": [
15
+ {"mean_absolute_error": 0.1},
16
+ {"mean_absolute_error": 0.3},
17
+ ],
18
+ "fallback_error": None,
19
+ },
20
+ }
21
+ row = summarize_manifest(manifest, "run.json")
22
+ assert row["projection_coverage_mean"] == 0.75
23
+ assert row["reprojection_mae_mean"] == 0.2
24
+ assert row["fused_point_count"] == 12
25
+ assert row["claims"]["generated_novel_views"] is False