MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / build_rows

Function build_rows

tools/dyn_bench/make_rd_table.py:157–173  ·  view source on GitHub ↗
(data: OrderedDict)

Source from the content-addressed store, hash-verified

155
156
157def build_rows(data: OrderedDict) -> List[Dict]:
158 rows: List[Dict] = []
159 for method, variants in data.items():
160 variant_items = list(variants.items())
161 has_multiple = len(variant_items) > 1
162 for variant_key, metrics in variant_items:
163 variant_name = variant_key if has_multiple else None
164 row_metrics = [extract_metric(metrics, spec) for spec in METRICS]
165 rows.append(
166 {
167 "row_id": (method, variant_name),
168 "method": method,
169 "display_name": format_display_name(method, variant_name),
170 "metrics": row_metrics,
171 }
172 )
173 return rows
174
175
176def build_table(rows: Sequence[Dict]) -> str:

Callers 1

mainFunction · 0.70

Calls 2

extract_metricFunction · 0.85
format_display_nameFunction · 0.70

Tested by

no test coverage detected