DeepGraphLearning / GearNet

GearNet and Geometric Pretraining Methods for Protein Structure Representation Learning, ICLR'2023 (https://arxiv.org/abs/2203.06125)
MIT License
263 stars 27 forks source link

TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases #30

Closed Brian-hongyan closed 1 year ago

Brian-hongyan commented 1 year ago

Thank you for your great work. However when try to pretrain,I encountered such error. python script/downstream.py -c config/downstream/EC/gearnet.yaml --gpus null Traceback (most recent call last): File "script/downstream.py", line 11, in from torchdrug import core, models, tasks, datasets, utils File "/home/hongyan/envs/pyg/lib/python3.7/site-packages/torchdrug/models/init.py", line 10, in from .esm import EvolutionaryScaleModeling File "/home/hongyan/envs/pyg/lib/python3.7/site-packages/torchdrug/models/esm.py", line 6, in import esm File "/home/hongyan/envs/pyg/lib/python3.7/site-packages/esm/init.py", line 8, in from .data import Alphabet, RobertaAlphabet, BatchConverter, FastaBatchedDataset # noqa File "/home/hongyan/envs/pyg/lib/python3.7/site-packages/esm/data.py", line 11, in from torchvision.datasets.utils import download_url File "/home/hongyan/envs/pyg/lib/python3.7/site-packages/torchvision/init.py", line 5, in from torchvision import datasets File "/home/hongyan/envs/pyg/lib/python3.7/site-packages/torchvision/datasets/init.py", line 1, in from ._optical_flow import KittiFlow, Sintel, FlyingChairs, FlyingThings3D, HD1K File "/home/hongyan/envs/pyg/lib/python3.7/site-packages/torchvision/datasets/_optical_flow.py", line 26, in class FlowDataset(ABC, VisionDataset): TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases Here is information of my environment: torch 1.11.0 torchdrug 0.2.0 pyg 2.0.4

Oxer11 commented 1 year ago

Hi, could you provide the version of fair-esm? I don't remember that fair-esm needs to import torchvision.

Brian-hongyan commented 1 year ago

Thanks. There is something wrong with my environment. I reinstall it and it works now.