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

Function group_by_episode

experiments/baselines/discourse_aware/runner.py:591–597  ·  view source on GitHub ↗
(rows: Sequence[Dict[str, Any]])

Source from the content-addressed store, hash-verified

589
590
591def group_by_episode(rows: Sequence[Dict[str, Any]]) -> Dict[str, List[Dict[str, Any]]]:
592 grouped: Dict[str, List[Dict[str, Any]]] = defaultdict(list)
593 for row in rows:
594 episode_id = str(row.get("episode_id") or "").strip()
595 if episode_id:
596 grouped[episode_id].append(row)
597 return grouped
598
599
600def label_key(row: Dict[str, Any]) -> Tuple[str, str]:

Callers 2

rerank_episodesFunction · 0.70
write_evaluationFunction · 0.70

Calls 1

getMethod · 0.80

Tested by

no test coverage detected