MCPcopy Create free account
hub / github.com/THUDM/AgentBench / TaskHandler

Class TaskHandler

src/analysis.py:144–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142
143
144class TaskHandler:
145 def match(self, task_name) -> bool:
146 raise NotImplementedError()
147
148 def get_main_metric(self, overall_result):
149 raise NotImplementedError()
150
151 def get_order_priority(self):
152 return 100000
153
154 @staticmethod
155 def get_handler(task_name) -> "TaskHandler":
156 handlers = [DCG(), HH(), OS(), DB(), KG(), LTP(), WB(), WS()]
157 for handler in handlers:
158 if handler.match(task_name):
159 return handler
160 raise ValueError(f"Unknown task: {task_name}")
161
162
163class DCG(TaskHandler):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected