MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / get_task_name_from_object

Function get_task_name_from_object

test/general/lm_eval/tasks/__init__.py:380–390  ·  view source on GitHub ↗
(task_object)

Source from the content-addressed store, hash-verified

378
379
380def get_task_name_from_object(task_object):
381 for name, class_ in TASK_REGISTRY.items():
382 if class_ is task_object:
383 return name
384
385 # this gives a mechanism for non-registered tasks to have a custom name anyways when reporting
386 return (
387 task_object.EVAL_HARNESS_NAME
388 if hasattr(task_object, "EVAL_HARNESS_NAME")
389 else type(task_object).__name__
390 )
391
392
393def get_task_dict(task_name_list: List[Union[str, lm_eval.base.Task]]):

Callers 1

get_task_dictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected