MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / build_label_map

Function build_label_map

experiments/baselines/scinup_strict/runner.py:163–171  ·  view source on GitHub ↗
(label_rows: Sequence[Dict[str, Any]])

Source from the content-addressed store, hash-verified

161
162
163def build_label_map(label_rows: Sequence[Dict[str, Any]]) -> Dict[Tuple[str, str], Dict[str, Any]]:
164 labels: Dict[Tuple[str, str], Dict[str, Any]] = {}
165 for row in label_rows:
166 labels[label_key(row)] = {
167 "selected": bool(row.get("selected")),
168 "oracle_score": row.get("oracle_score", 0.0),
169 "oracle_label": row.get("oracle_label", "irrelevant"),
170 }
171 return labels
172
173
174def load_roles(roles_file: Path) -> Dict[str, Dict[str, Any]]:

Callers 1

rerank_episodesFunction · 0.70

Calls 2

getMethod · 0.80
label_keyFunction · 0.70

Tested by

no test coverage detected