question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running benchmark.py reports an error

See original GitHub issue

Dear developer, I want to calculate the inference time of Faster R-CNN on my computer, so I am going to use the benchmark.py file. The command entered is as follows. python -m torch.distributed.launch --nproc_per_node=1 --master_port=29500 tools/analysis_tools/benchmark.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py work_dirs/faster_rcnn_r50_fpn_1x_coco/epoch_100.pth --launcher pytorch --fuse-conv-bn However, I encountered the following error report, how can I solve it? My computer system is Win10, GPU is Quadro P5000 single card, CUDA is 10.2. Thank you.

Traceback (most recent call last):
  File "tools/analysis_tools/benchmark.py", line 143, in <module>
    main()
  File "tools/analysis_tools/benchmark.py", line 136, in main
    init_dist(args.launcher, **cfg.dist_params)
  File "f:\pycharmprojects\mmdetection_env\mmcv\mmcv\runner\dist_utils.py", line 20, in init_dist
    _init_dist_pytorch(backend, **kwargs)
  File "f:\pycharmprojects\mmdetection_env\mmcv\mmcv\runner\dist_utils.py", line 34, in _init_dist_pytorch
    dist.init_process_group(backend=backend, **kwargs)
  File "D:\Anaconda3\envs\mmdetection_env\lib\site-packages\torch\distributed\distributed_c10d.py", line 433, in init_process_group
    rendezvous_iterator = rendezvous(
  File "D:\Anaconda3\envs\mmdetection_env\lib\site-packages\torch\distributed\rendezvous.py", line 82, in rendezvous
    raise RuntimeError("No rendezvous handler for {}://".format(result.scheme))
RuntimeError: No rendezvous handler for env://
Traceback (most recent call last):
  File "D:\Anaconda3\envs\mmdetection_env\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "D:\Anaconda3\envs\mmdetection_env\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\Anaconda3\envs\mmdetection_env\lib\site-packages\torch\distributed\launch.py", line 260, in <module>
    main()
  File "D:\Anaconda3\envs\mmdetection_env\lib\site-packages\torch\distributed\launch.py", line 255, in main
    raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['D:\\Anaconda3\\envs\\mmdetection_env\\python.exe', '-u', 'tools/analysis_tools/benchmark.py', '--local_rank=0', 'configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py', 'work_dirs/faster_rcnn_r50_
fpn_1x_coco/epoch_100.pth', '--launcher', 'pytorch', '--fuse-conv-bn']' returned non-zero exit status 1.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

0reactions
zxsitucommented, Sep 5, 2021

@shinya7y Thanks for your prompt advice, I tested it and it ran successfully!!! My computer (Quadro P5000) ran Faster RCNN Resnet50 with a result of 15.8 FPS. I believe this result should be quite reasonable.

(mmdetection_env) F:\PycharmProjects\mmdetection_env\mmdetection>python tools/analysis_tools/benchmark.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py work_dirs/faster_rcnn_r50_fpn_1x_coco/epoch_100.pth --fuse-conv-bn
D:\Anaconda3\envs\mmdetection_env\lib\site-packages\mmdet-2.15.1-py3.8.egg\mmdet\core\anchor\builder.py:16: UserWarning: ``build_anchor_generator`` would be deprecated soon, please use ``build_prior_generator``
  warnings.warn(
Use load_from_local loader
D:\Anaconda3\envs\mmdetection_env\lib\site-packages\mmdet-2.15.1-py3.8.egg\mmdet\core\anchor\anchor_generator.py:324: UserWarning: ``grid_anchors`` would be deprecated soon. Please use ``grid_priors``
  warnings.warn('``grid_anchors`` would be deprecated soon. '
D:\Anaconda3\envs\mmdetection_env\lib\site-packages\mmdet-2.15.1-py3.8.egg\mmdet\core\anchor\anchor_generator.py:360: UserWarning: ``single_level_grid_anchors`` would be deprecated soon. Please use ``single_level_grid_priors``
  warnings.warn(
Done image [50 / 2000], fps: 15.7 img / s
Done image [100/ 2000], fps: 15.7 img / s
Done image [150/ 2000], fps: 15.7 img / s
Done image [200/ 2000], fps: 15.8 img / s
Read more comments on GitHub >

github_iconTop Results From Across the Web

Usage — pytest-benchmark 4.0.0 documentation
Benchmarked functions are only ran once and no stats are reported. Use this if you want to run the test but don't do...
Read more >
[PYTHON-2537] Fix benchmark failures on Python 3
[2021/01/21 19:47:04.112] Running TestGridFsUpload. MEDIAN=0.24435001611709595. [2021/01/21 19:52:21.776] .
Read more >
pytest-benchmark 4.0.0
A pytest fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer. See calibration and...
Read more >
pytest-benchmark
Benchmarked functions are only ran once and no stats are reported. Use this if you want to run the test but don't do...
Read more >
Benchmark Python Tool - OpenVINO™ Documentation
The Python benchmark_app is automatically installed when you install OpenVINO Developer Tools using PyPI. Before running benchmark_app , make sure the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found