IDEA-Research / DINO

[ICLR 2023] Official implementation of the paper "DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection"
Apache License 2.0
2.08k stars 228 forks source link

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

Open oliviervluijk opened 6 months ago

oliviervluijk commented 6 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

meirashaf commented 1 week ago

you have the same problem as this issue https://github.com/CASIA-IVA-LAB/DPT/issues/1