(subparser)
| 5 | |
| 6 | CUR_DIR = os.path.dirname(os.path.abspath(__file__)) |
| 7 | def register_subparsers(subparser): |
| 8 | parser = subparser.add_parser('evaluate', formatter_class=argparse.RawTextHelpFormatter) |
| 9 | parser.add_argument( |
| 10 | "--ngpus", |
| 11 | type=int, |
| 12 | default=1, |
| 13 | help="Number of GPUs to run evaluation on" |
| 14 | ) |
| 15 | parser.add_argument( |
| 16 | "--output_path", |
| 17 | type=str, |
| 18 | default='./evaluation_results/', |
| 19 | help="output path to save the evaluation results", |
| 20 | ) |
| 21 | parser.add_argument( |
| 22 | "--full_json_dir", |
| 23 | type=str, |
| 24 | default=f'{CUR_DIR}/../MBench_full_info.json', |
| 25 | help="path to save the json file that contains the prompt and dimension information", |
| 26 | ) |
| 27 | parser.add_argument( |
| 28 | "--evaluation_path", |
| 29 | type=str, |
| 30 | required=True, |
| 31 | help="folder that contains the model generated results", |
| 32 | ) |
| 33 | parser.add_argument( |
| 34 | "--dimension", |
| 35 | type=str, |
| 36 | required=True, |
| 37 | help="list of evaluation dimensions, usage: --dimension <dim_1> <dim_2>", |
| 38 | ) |
| 39 | parser.add_argument( |
| 40 | "--load_ckpt_from_local", |
| 41 | type=bool, |
| 42 | required=False, |
| 43 | help="whether load checkpoints from local default paths (assuming you have downloaded the checkpoints locally", |
| 44 | ) |
| 45 | |
| 46 | parser.set_defaults(func=evaluate) |
| 47 | |
| 48 | def stringify_cmd(cmd_ls): |
| 49 | cmd = "" |
nothing calls this directly
no outgoing calls
no test coverage detected