jkli1998 / T-CAR

Code for paper 'Zero-Shot Scene Graph Generation via Triplet Calibration and Reduction' (TOMM 2023)
MIT License
6 stars 0 forks source link

ImportError: cannot import name 'container_abcs' #2

Closed Lxy811 closed 6 months ago

Lxy811 commented 8 months ago

from torch._six import container_abcs ImportError: cannot import name 'container_abcs' Can you help me see how to solve this problem?Is it because of the torch version?

jkli1998 commented 8 months ago

Yes, StackOverflow shows that runs from torch._six import container_abcs at the pytorch greater than 1.9 will report an error, the correct code is to use 'import collections.abc as container_abcs'. Can you tell me which line of code in this repository runs the 'from torch._six import container_abcs'?

Lxy811 commented 8 months ago

Yes, StackOverflow shows that runs from torch._six import container_abcs at the pytorch greater than 1.9 will report an error, the correct code is to use 'import collections.abc as container_abcs'. Can you tell me which line of code in this repository runs the 'from torch._six import container_abcs'? Snipaste_2024-02-28_22-15-33

jkli1998 commented 8 months ago

There is nothing wrong with this code. I suspect the problem may be a conflict between your installed versions of ‘apex’ and ‘pytorch’.

Lxy811 commented 8 months ago

There is nothing wrong with this code. I suspect the problem may be a conflict between your installed versions of ‘apex’ and ‘pytorch’.

Ok, I'll have another look