From 28d179c54036e9b164b86595fee5d778e163bb1e Mon Sep 17 00:00:00 2001 From: Myhs-phz Date: Wed, 5 Mar 2025 09:43:31 +0000 Subject: [PATCH] style function name --- opencompass/cli/main.py | 11 +++++------ opencompass/utils/result_station.py | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/opencompass/cli/main.py b/opencompass/cli/main.py index 08c442b5..b50e88e5 100644 --- a/opencompass/cli/main.py +++ b/opencompass/cli/main.py @@ -12,8 +12,8 @@ from mmengine.config import Config, DictAction from opencompass.registry import PARTITIONERS, RUNNERS, build_from_cfg from opencompass.runners import SlurmRunner from opencompass.summarizers import DefaultSummarizer -from opencompass.utils import (LarkReporter, Read_From_Station, - Save_To_Station, get_logger) +from opencompass.utils import (LarkReporter, read_from_station, + save_to_station, get_logger) from opencompass.utils.run import (fill_eval_cfg, fill_infer_cfg, get_config_from_arg) @@ -65,8 +65,7 @@ def parse_args(): help='Running mode. You can choose "infer" if you ' 'only want the inference results, or "eval" if you ' 'already have the results and want to evaluate them, ' - 'or "viz" if you want to visualize the results,' - 'or "rs" if you want to search results from your station.', + 'or "viz" if you want to visualize the results.', choices=['all', 'infer', 'eval', 'viz'], default='all', type=str) @@ -287,7 +286,7 @@ def main(): # get existed results 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] cfg['rs_exist_results'] = rs_exist_results @@ -382,7 +381,7 @@ def main(): # save to station 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 if args.mode in ['all', 'eval', 'viz']: diff --git a/opencompass/utils/result_station.py b/opencompass/utils/result_station.py index 1664ac3d..3fc7f471 100644 --- a/opencompass/utils/result_station.py +++ b/opencompass/utils/result_station.py @@ -8,7 +8,7 @@ from opencompass.utils.abbr import (dataset_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: station_path = args.station_path @@ -238,7 +238,7 @@ def Save_To_Station(cfg, args): 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 if args.station_path is not None: