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

Function group_by_episode

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

Source from the content-addressed store, hash-verified

666
667
668def group_by_episode(rows: Sequence[Dict[str, Any]]) -> Dict[str, List[Dict[str, Any]]]:
669 grouped: Dict[str, List[Dict[str, Any]]] = defaultdict(list)
670 for row in rows:
671 episode_id = str(row.get("episode_id") or "").strip()
672 if episode_id:
673 grouped[episode_id].append(row)
674 return grouped
675
676
677def 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