Skip to content

Commit 280cc7d

Browse files
authored
[Enhance] Support reading gpu_collect from cfg.evaluation.gpu_collect (#7672)
* feat: read from cfg.evaluation.gpu_collect * chore: yapf * fix: gpu_collect not in config
1 parent 5146c3b commit 280cc7d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/test.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,9 @@ def main():
239239
cfg.device,
240240
device_ids=[int(os.environ['LOCAL_RANK'])],
241241
broadcast_buffers=False)
242-
outputs = multi_gpu_test(model, data_loader, args.tmpdir,
243-
args.gpu_collect)
242+
outputs = multi_gpu_test(
243+
model, data_loader, args.tmpdir, args.gpu_collect
244+
or cfg.evaluation.get('gpu_collect', False))
244245

245246
rank, _ = get_dist_info()
246247
if rank == 0:

0 commit comments

Comments
 (0)