MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / get_model_arena_logs

Function get_model_arena_logs

codeclash/analysis/code_evolve/main.py:25–33  ·  view source on GitHub ↗

Get all log folders matching the specified model(s) and arena(s).

(model: str | list[str], arena: str | list[str])

Source from the content-addressed store, hash-verified

23
24
25def get_model_arena_logs(model: str | list[str], arena: str | list[str]) -> list[Path]:
26 """Get all log folders matching the specified model(s) and arena(s)."""
27 arena = arena if isinstance(arena, list) else [arena]
28 model = model if isinstance(model, list) else [model]
29 return [
30 x.parent
31 for x in Path(LOCAL_LOG_DIR).rglob("metadata.json")
32 if x.parent.name.split(".")[1] in arena and all(f".{m}." in x.parent.name for m in model)
33 ]
34
35
36def get_submission_diff_at_round(log_folder: Path, player_name: str, round_num: int) -> PatchSet:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected