umyelab / LabGym

Quantify user-defined behaviors.
GNU General Public License v3.0
66 stars 6 forks source link

Recent detectron2 commit broke LabGym #147

Closed vincent-legoll closed 2 months ago

vincent-legoll commented 5 months ago

AttributeError: module 'torch' has no attribute 'compiler'

As a workaround, you can take the code from just before the commit that broke it: pip install 'git+https://github.com/facebookresearch/detectron2.git@a59f05630a8f205756064244bf5beb8661f96180'

Upstream issue is here

This is not really an issue in LabGym, but as I stumbled upon it, I thought it might help to mention it...

Feel free to close if it's inapropriate.

vincent-legoll commented 5 months ago

Or maybe change the installation doc to use the following, which should work: pip install 'git+https://github.com/facebookresearch/detectron2.git@v0.6'

I have not tested this incantation though.

yujiahu415 commented 5 months ago

Thank you so much for pointing out this! Yes, we’ll update the installation instructions to reflect that issue! By the way, can you also let me know which PyTorch version you used when having this issue? I checked the PyTorch and this attribute error seemed to exist before torch<2.0. Not sure whether 2.0.1 still had this error. Thanks!

vincent-legoll commented 5 months ago

I checked today, that's what I have, but I cannot remember if this was the one at time of failure:

(venv-labgym) labgym@labgym:~$ pip list|grep -i torch
torch                        2.0.1+cu118
torchvision                  0.15.2+cu118
yujiahu415 commented 5 months ago

Thanks for letting me this! Looks like the issue also exists with torch2.0.1.