Unverified Commit fa78c4f1 authored by Jiajun Deng's avatar Jiajun Deng Committed by GitHub
Browse files

add options to control the number of checkpoints being evaluated after training (#770)

parent 5861246c
......@@ -41,6 +41,7 @@ def parse_config():
parser.add_argument('--max_waiting_mins', type=int, default=0, help='max waiting minutes')
parser.add_argument('--start_epoch', type=int, default=0, help='')
parser.add_argument('--num_epochs_to_eval', type=int, default=0, help='number of checkpoints to be evaluated')
parser.add_argument('--save_to_file', action='store_true', default=False, help='')
args = parser.parse_args()
......@@ -186,7 +187,7 @@ def main():
)
eval_output_dir = output_dir / 'eval' / 'eval_with_train'
eval_output_dir.mkdir(parents=True, exist_ok=True)
args.start_epoch = max(args.epochs - 0, 0) # Only evaluate the last 10 epochs
args.start_epoch = max(args.epochs - args.num_epochs_to_eval, 0) # Only evaluate the last args.num_epochs_to_eval epochs
repeat_eval_ckpt(
model.module if dist_train else model,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment