Force evaluation to run on 1 gpu only
@@ -92,7 +92,12 @@ def main():
if args.mode == 'eval' or args.mode == 'train_eval':
if 'eval_params' in config_module:
eval_config.update(copy.deepcopy(config_module['eval_params']))
+ eval_config['gpu_ids'] = [eval_config['num_gpus'] - 1]
+ if 'num_gpus' in eval_config:
+ del eval_config['num_gpus']
if hvd is None or hvd.rank() == 0:
+ deco_print("Evaluation can only be run on one GPU. "
+ "Setting num_gpus to 1 for eval model")
deco_print("Evaluation config:")
pprint.pprint(eval_config)
if args.mode == "infer":
