fundamentalvision / Deformable-DETR

Deformable DETR: Deformable Transformers for End-to-End Object Detection.
Apache License 2.0
3.14k stars 513 forks source link

Not able to install package using setuptools (setup.py) on AzureML #221

Open oliviervluijk opened 8 months ago

oliviervluijk commented 8 months ago

I'm currently working on the implementation of this github on AzureML. I've succesfully created an environment with CUDA and torch and this environment is succesfully compiled. Step 4 of the installation guide is installing the package using a setup.py file (to install MultiScaleDeformableAttention):

python setup.py build install

The method I used now if using subprocess in the main.py file to install this setup.py directly to the compute.

subprocess.run(["python", "setup.py", "build", "install"])

I can find the following information in my logfile, which indicates that the installation was succesfull:

Installed /opt/conda/envs/ptca/lib/python3.8/site-packages/MultiScaleDeformableAttention-1.0-py3.8-linux-x86_64.egg Processing dependencies for MultiScaleDeformableAttention==1.0 Finished processing dependencies for MultiScaleDeformableAttention==1.0

When MultiScaleDeformableAttention is imported (either manually or in the code function build_model_main()) I get the following error: ModuleNotFoundError: No module named 'MultiScaleDeformableAttention'. I've also tried installing it after this installing with pip install multiscaledeformableattention, but got the same error unfortunately

Question: How can I succesfully import/install the package on AzureML?

BTW: I checked whether GPU is available using and the output is True

print(torch.cuda.is_available())

Thanks for your help