(args, step_num)
| 138 | |
| 139 | |
| 140 | def verify_model(args, step_num): |
| 141 | output_dir = get_output_dir(args, step_num) |
| 142 | model_size = get_model_size(args, step_num) |
| 143 | model_file = os.path.join(output_dir, "pytorch_model.bin") |
| 144 | if not os.path.isfile(model_file): |
| 145 | error_str = f"Step {step_num} model has not been trained. Train it with:\n" |
| 146 | error_str += f"python3 train.py --step {step_num}" |
| 147 | error_str += f" --{model_type[step_num]}-model {model_size}" |
| 148 | raise RuntimeError(error_str) |
| 149 | |
| 150 | |
| 151 | def get_cmd(args, step_num): |
no test coverage detected