Megvii-BaseDetection / Megvii-BaseDetection/YOLOX

RuntimeError: Error building extension 'fast_cocoeval'

Open
#1,459 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

Using C:\Users\15496\AppData\Local\torch_extensions\torch_extensions\Cache\py37_cu113 as PyTorch extensions root...
Emitting ninja build file C:\Users\15496\AppData\Local\torch_extensions\torch_extensions\Cache\py37_cu113\fast_cocoeval\build.ninja...
Building extension module fast_cocoeval...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/1] "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64/link.exe" cocoeval.o /nologo /DLL c10.lib torch_cpu.lib torch.lib /LIBPATH:D:\F\Anaconda3\envs\yolox\lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\F\Anaconda3\envs\yolox\libs /out:fast_cocoeval.pyd
FAILED: fast_cocoeval.pyd
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64/link.exe" cocoeval.o /nologo /DLL c10.lib torch_cpu.lib torch.lib /LIBPATH:D:\F\Anaconda3\envs\yolox\lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\F\Anaconda3\envs\yolox\libs /out:fast_cocoeval.pyd
LINK : fatal error LNK1104: 无法打开文件“fast_cocoeval.pyd”
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "D:\F\Anaconda3\envs\yolox\lib\site-packages\torch\utils\cpp_extension.py", line 1723, in _run_ninja_build
env=env)
File "D:\F\Anaconda3\envs\yolox\lib\subprocess.py", line 468, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "", line 1, in
File "D:\pywork\3.debug\YOLOX\yolox\layers_init_.py", line 11, in
from .fast_coco_eval_api import COCOeval_opt
File "D:\pywork\3.debug\YOLOX\yolox\layers\fast_coco_eval_api.py", line 17, in
FastCOCOEvalOp().jit_load()
File "D:\pywork\3.debug\YOLOX\yolox\layers\jit_ops.py", line 107, in jit_load
verbose=verbose,
File "D:\F\Anaconda3\envs\yolox\lib\site-packages\torch\utils\cpp_extension.py", line 1136, in load
keep_intermediates=keep_intermediates)
File "D:\F\Anaconda3\envs\yolox\lib\site-packages\torch\utils\cpp_extension.py", line 1347, in _jit_compile
is_standalone=is_standalone)
File "D:\F\Anaconda3\envs\yolox\lib\site-packages\torch\utils\cpp_extension.py", line 1452, in _write_ninja_file_and_build_library
error_prefix=f"Error building extension '{name}'")
File "D:\F\Anaconda3\envs\yolox\lib\site-packages\torch\utils\cpp_extension.py", line 1733, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'fast_cocoeval'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows import failure through yolox/layers/init.py, which loads yolox/layers/fast_coco_eval_api.py and jit_ops.py. Inspect the PyTorch extension build output and verify that the fast_cocoeval extension can be built and imported successfully; no specific test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
build-system, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.