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

Function parse_trajectory_name

codeclash/analysis/llm_as_judge/utils.py:79–91  ·  view source on GitHub ↗
(trajectory_path: Path)

Source from the content-addressed store, hash-verified

77
78
79def parse_trajectory_name(trajectory_path: Path) -> Instance:
80 try:
81 round_number = int(trajectory_path.name.removesuffix(".traj.json").split("_r")[1])
82 except:
83 print(trajectory_path)
84 raise
85 tournament_name = trajectory_path.parent.parent.parent.name
86 return Instance(
87 trajectory_path=trajectory_path,
88 player_name=trajectory_path.parent.name,
89 round_number=round_number,
90 tournament_name=tournament_name,
91 )
92
93
94def get_instances(input_folder: Path) -> list[Instance]:

Callers 1

get_instancesFunction · 0.85

Calls 1

InstanceClass · 0.85

Tested by

no test coverage detected