MCZhi/DIPP

Theseus Version Error (Import Error)

Closed this issue · 1 comments

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.

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.