mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00

* [Feature] Support import configs/models/summarizers from whl * Update LCBench configs * Update * Update * Update * Update * update * Update * Update * Update * Update * Update
23 lines
822 B
Python
23 lines
822 B
Python
|
|
from mmengine.config import read_base
|
|
|
|
with read_base():
|
|
from .compassbench_v1_1_objective import summarizer
|
|
|
|
for dataset_abbr in summarizer['dataset_abbrs']:
|
|
if isinstance(dataset_abbr, str):
|
|
continue
|
|
else:
|
|
dataset_abbr[0] = dataset_abbr[0] + '_public'
|
|
for summary_group in summarizer['summary_groups']:
|
|
summary_group['name'] = summary_group['name'] + '_public'
|
|
replaced_subset = []
|
|
for subset in summary_group['subsets']:
|
|
if isinstance(subset, str):
|
|
replaced_subset.append(subset + '_public')
|
|
else:
|
|
replaced_subset.append([subset[0] + '_public', subset[1]])
|
|
summary_group['subsets'] = replaced_subset
|
|
if 'weights' in summary_group:
|
|
summary_group['weights'] = {k + '_public': v for k, v in summary_group['weights'].items()}
|