mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
style function name
This commit is contained in:
parent
28cdf4e776
commit
28d179c540
@ -12,8 +12,8 @@ from mmengine.config import Config, DictAction
|
|||||||
from opencompass.registry import PARTITIONERS, RUNNERS, build_from_cfg
|
from opencompass.registry import PARTITIONERS, RUNNERS, build_from_cfg
|
||||||
from opencompass.runners import SlurmRunner
|
from opencompass.runners import SlurmRunner
|
||||||
from opencompass.summarizers import DefaultSummarizer
|
from opencompass.summarizers import DefaultSummarizer
|
||||||
from opencompass.utils import (LarkReporter, Read_From_Station,
|
from opencompass.utils import (LarkReporter, read_from_station,
|
||||||
Save_To_Station, get_logger)
|
save_to_station, get_logger)
|
||||||
from opencompass.utils.run import (fill_eval_cfg, fill_infer_cfg,
|
from opencompass.utils.run import (fill_eval_cfg, fill_infer_cfg,
|
||||||
get_config_from_arg)
|
get_config_from_arg)
|
||||||
|
|
||||||
@ -65,8 +65,7 @@ def parse_args():
|
|||||||
help='Running mode. You can choose "infer" if you '
|
help='Running mode. You can choose "infer" if you '
|
||||||
'only want the inference results, or "eval" if you '
|
'only want the inference results, or "eval" if you '
|
||||||
'already have the results and want to evaluate them, '
|
'already have the results and want to evaluate them, '
|
||||||
'or "viz" if you want to visualize the results,'
|
'or "viz" if you want to visualize the results.',
|
||||||
'or "rs" if you want to search results from your station.',
|
|
||||||
choices=['all', 'infer', 'eval', 'viz'],
|
choices=['all', 'infer', 'eval', 'viz'],
|
||||||
default='all',
|
default='all',
|
||||||
type=str)
|
type=str)
|
||||||
@ -287,7 +286,7 @@ def main():
|
|||||||
|
|
||||||
# get existed results from station
|
# get existed results from station
|
||||||
if args.read_from_station:
|
if args.read_from_station:
|
||||||
existing_results_list = Read_From_Station(cfg, args)
|
existing_results_list = read_from_station(cfg, args)
|
||||||
rs_exist_results = [comb['combination'] for comb in existing_results_list]
|
rs_exist_results = [comb['combination'] for comb in existing_results_list]
|
||||||
cfg['rs_exist_results'] = rs_exist_results
|
cfg['rs_exist_results'] = rs_exist_results
|
||||||
|
|
||||||
@ -382,7 +381,7 @@ def main():
|
|||||||
|
|
||||||
# save to station
|
# save to station
|
||||||
if args.station_path is not None or cfg.get('station_path') is not None:
|
if args.station_path is not None or cfg.get('station_path') is not None:
|
||||||
Save_To_Station(cfg, args)
|
save_to_station(cfg, args)
|
||||||
|
|
||||||
# visualize
|
# visualize
|
||||||
if args.mode in ['all', 'eval', 'viz']:
|
if args.mode in ['all', 'eval', 'viz']:
|
||||||
|
@ -8,7 +8,7 @@ from opencompass.utils.abbr import (dataset_abbr_from_cfg,
|
|||||||
model_abbr_from_cfg)
|
model_abbr_from_cfg)
|
||||||
|
|
||||||
|
|
||||||
def Save_To_Station(cfg, args):
|
def save_to_station(cfg, args):
|
||||||
|
|
||||||
if args.station_path is not None:
|
if args.station_path is not None:
|
||||||
station_path = args.station_path
|
station_path = args.station_path
|
||||||
@ -238,7 +238,7 @@ def Save_To_Station(cfg, args):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def Read_From_Station(cfg, args):
|
def read_from_station(cfg, args):
|
||||||
|
|
||||||
assert args.station_path is not None or cfg.get('station_path') is not None
|
assert args.station_path is not None or cfg.get('station_path') is not None
|
||||||
if args.station_path is not None:
|
if args.station_path is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user