DeepGraphLearning / ESM-GearNet

ESM-GearNet for Protein Structure Representation Learning (https://arxiv.org/abs/2303.06275)
79 stars 10 forks source link

Metaclass conflict in Dataset Class #1

Open origamiimaster opened 8 months ago

origamiimaster commented 8 months ago

I am trying to run the scripts to replicate the findings in the paper. Running

python -m torch.distributed.launch --nproc_per_node=1 script/downstream.py -c config/EC/esm_gearnet.yaml

gives the following error when I try:

...
File "/mnt/d/case-sensitive/miniconda3/envs/scatter38/lib/python3.8/site-packages/torch_geometric/data/dataset.py", line 30, in <module>
    class Dataset(torch.utils.data.Dataset, ABC):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

OS: Ubuntu 22.04 in WSL Python Version 3.8.18 (Conda) Torch: 2.2.1 for CUDA 12.1

Any idea what I can do to resolve this error?

Thank you!

origamiimaster commented 8 months ago

I found the source of the problem, it looks like there was an issue that was fixed in pytorch-geometric that resolves this by changing the class.

See this.

This appears to be resolved once conda updates the latest pytorch-geometric build.