ESM-GearNet icon indicating copy to clipboard operation
ESM-GearNet copied to clipboard

Metaclass conflict in Dataset Class

Open origamiimaster opened this issue 1 year ago • 1 comments

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 avatar Mar 03 '24 02:03 origamiimaster

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.

origamiimaster avatar Mar 04 '24 20:03 origamiimaster