MCPcopy Create free account
hub / github.com/Tencent/digitalhuman / load_leaderboard

Function load_leaderboard

SWF/src/utils.py:406–424  ·  view source on GitHub ↗
(
        names: List[str],
        leaderboards: List[str] = ["IFEval", "MATH", "GPQA", "MuSR", "MMLU", "Average"],
        width: int = 10,
    )

Source from the content-addressed store, hash-verified

404
405
406def load_leaderboard(
407 names: List[str],
408 leaderboards: List[str] = ["IFEval", "MATH", "GPQA", "MuSR", "MMLU", "Average"],
409 width: int = 10,
410 ):
411 header = ["name"] + leaderboards
412 collects = [header]
413 for name in names:
414 collect = [DOCUMENTATIONS_R[name][col] for col in header]
415 collects.append(collect)
416
417 collects = [
418 ' '.join([collect[0].rjust(width+2)] + [str(e).ljust(width) for e in collect[1:]])
419 for collect in collects
420 ]
421 collects = '\n'.join(collects)
422 collects += "\n\nCaption: **Overview** of each column." + '\n\n' + '\n\n'.join([f'**{col}**: ' + LEADERBOARD[col] for i, col in enumerate(leaderboards, 1)])
423 collects += f"\nYou can only select from {names} with HP > 0 (enclosed in <agent> <agent_name>)."
424 return collects
425
426
427def gini_coefficient(wealth):

Callers 1

stepMethod · 0.90

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected