MCZhi / DIPP

[TNNLS] Differentiable Integrated Prediction and Planning Framework for Urban Autonomous Driving
https://mczhi.github.io/DIPP/
197 stars 40 forks source link

Theseus Version Error (Import Error) #28

Closed HzcIrving closed 6 months ago

HzcIrving commented 6 months ago

Hi, Zhiyu.

I encountered the following issue during the training phase:

ImportError: cannot import name 'tree_map_only' from 'torch.utils._pytree'

I guess there exists a mismatch between the Pytorch Version and Theseus. The details are as follows:

[https://github.com/facebookresearch/theseus/discussions/589](Theseus installation issues (python 3.8, pytorch 1.12.1) ImportError: cannot import name 'tree_map_only' from 'torch.utils._pytree' #589)

I would appreciate any help with this issue. Thank you for your time and assistance.

MCZhi commented 6 months ago

Hi, @HzcIrving, thank you for your interest in our work. Yes, that seems to be a mismatch between Pytorch and Theseus. Our work is based on previous versions of Theseus (<= 0.1.3). To resolve this issue, I recommend installing an earlier version of Theseus (preferably 0.1.2 or 0.1.1), following the official instructions. Alternatively, you may try upgrading the version of Pytorch or Theseus to match the version, but please note that this has not been tested.