scenediffuser / Scene-Diffuser

Official implementation of CVPR23 paper "Diffusion-based Generation, Optimization, and Planning in 3D Scenes"
https://scenediffuser.github.io/
MIT License
349 stars 24 forks source link

<lambda> already registered #8

Closed dennisushi closed 1 year ago

dennisushi commented 1 year ago
Traceback (most recent call last):
  File "plan.py", line 16, in <module>
    from models.environment import create_enviroment
  File "/home/dennisushi/repos/temp/Scene-Diffuser/models/environment.py", line 551, in <module>
    class PathPlanningEnvWrapper():
  File "/home/dennisushi/repos/temp/Scene-Diffuser/utils/registry.py", line 61, in deco
    self._do_register(name, func_or_class)
  File "/home/dennisushi/repos/temp/Scene-Diffuser/utils/registry.py", line 45, in _do_register
    assert (
AssertionError: An object named '<lambda>' was already registered in 'Env' registry!

Have you encountered this before? I am trying to run the arm motion planning checkpoint bash scripts/franka_planning/plan.sh ./chkpt/2022-11-11_14-28-30_FK2Plan_ptr_T30_4/.

Silverster98 commented 1 year ago

Can you check the classes registered in the registry when the script executes from models.environment import create_enviroment? I remember we don't register the <lambda>. I am wondering if you use the same registry from other sources. We didn't have this problem before.

gftww commented 1 year ago

Thank you for your awesome work, I got same error. I print the all the obj names as follows: 2023-07-25 09-50-11 的屏幕截图 It seems that the error results form the userwarning DecoratorContextManager.

Silverster98 commented 1 year ago

Thank you for your awesome work, I got same error. I print the all the obj names as follows: 2023-07-25 09-50-11 的屏幕截图 It seems that the error results form the userwarning DecoratorContextManager.

It appears that this warning arises in versions beyond pytorch2.0.0, while our code is currently using pytorch1.11. I am not very sure, but you can downgrade the Pytorch version to try to rerun the code.

Silverster98 commented 1 year ago

Thank you for your awesome work, I got same error. I print the all the obj names as follows: 2023-07-25 09-50-11 的屏幕截图 It seems that the error results form the userwarning DecoratorContextManager.

I know where the problem is. If you use pytorch2, you should not use @ENV.register() and @torch.no_grad() as the class decoration simultaneously. Just remove this line as follows.

image