(args)
| 124 | |
| 125 | # flake8: noqa: F405 |
| 126 | def args_sanity_checks(args): |
| 127 | check_old_arg(args.config) |
| 128 | check_exist(args.config, "Config file") |
| 129 | check_ext(args.config, ".json", "Config file") |
| 130 | config = get_normalized_config(args.config) |
| 131 | |
| 132 | weight_dir = get_dirname(args.config) |
| 133 | check_tokenizer_exist(weight_dir) |
| 134 | check_weights_exist(weight_dir) |
| 135 | |
| 136 | check_supported_model(config) |
| 137 | check_supported_tokenizer(config) |
| 138 | |
| 139 | if args.preformatter is not None: |
| 140 | check_exist(args.preformatter, "Preformatter json file") |
| 141 | check_ext(args.preformatter, ".json", "preformatter") |
| 142 | |
| 143 | if args.dataset is not None: |
| 144 | check_exist(args.dataset) |
| 145 | |
| 146 | check_between_inclusive(args.num_chunks, 1, config.num_hidden_layers, "num_chunks") |
| 147 | |
| 148 | check_shapes(args.shapes) |
| 149 | |
| 150 | |
| 151 | def print_args(args, exp_name): |
no test coverage detected