I'm trying to run the deit colab notebook found here:
but I'm running into an issue in the second cell, specifically the import timm line, which returns this:
ImportError: cannot import name 'container_abcs' from 'torch._six'
I'm trying to run the deit colab notebook found here:
but I'm running into an issue in the second cell, specifically the import timm line, which returns this:
ImportError: cannot import name 'container_abcs' from 'torch._six'
when I install torch==1.9.0 and torch-geometric, the old code has the errors.
here is my solution:
TORCH_MAJOR = int(torch.__version__.split('.')[0])
TORCH_MINOR = int(torch.__version__.split('.')[1])
if TORCH_MAJOR == 0:
import collections.abc as container_abcs
else:
from torch._six import container_abcs
change to:
TORCH_MAJOR = int(torch.__version__.split('.')[0])
TORCH_MINOR = int(torch.__version__.split('.')[1])
if TORCH_MAJOR == 1 and TORCH_MINOR < 8:
from torch._six import container_abcs,int_classes
else:
import collections.abc as container_abcs
int_classes = int