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

An error occurring when using the StepLR scheduler on the FOLD3D dataset #36

Closed arantir123 closed 1 year ago

arantir123 commented 1 year ago

Hi, thank you for your amazing work! I tried to reproduce the GearNet results on Fold3D dataset, I followed the original .yaml file in which the StepLR scheduler was specified. However, there was an error occurring when using the scheduler as follows, I would like to ask what causes this, thank you!

15:28:38 #train: 12312, #valid: 736, #test: 718 Traceback (most recent call last): File "script/downstream.py", line 74, in solver, scheduler = util.build_downstream_solver(cfg, dataset) File "/GearNet-new/util.py", line 121, in build_downstream_solver scheduler = core.Configurable.load_config_dict(cfg.scheduler) File "/torchdrug/lib/python3.8/site-packages/torchdrug/core/core.py", line 269, in load_config_dict return cls(new_config) File "/torchdrug/lib/python3.8/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), *kw) File "/torchdrug/lib/python3.8/site-packages/torchdrug/core/core.py", line 288, in wrapper return init(self, args, kwargs) File "/torchdrug/lib/python3.8/site-packages/torch/optim/lr_scheduler.py", line 367, in init super(StepLR, self).init(optimizer, last_epoch, verbose) File "/torchdrug/lib/python3.8/site-packages/torch/optim/lr_scheduler.py", line 367, in init super(StepLR, self).init(optimizer, last_epoch, verbose) File "/torchdrug/lib/python3.8/site-packages/torch/optim/lr_scheduler.py", line 367, in init super(StepLR, self).init(optimizer, last_epoch, verbose) [Previous line repeated 991 more times] RecursionError: maximum recursion depth exceeded while calling a Python object

Oxer11 commented 1 year ago

Hi, sorry for the inconvience. Actually, this is a bug in TorchDrug when reloading the scheduler. This has been fixed in https://github.com/DeepGraphLearning/torchdrug/commit/4ea99a04e258689f944804df091b209bfebea138. Could you try to install the TorchDrug library from the source code and see whether this can be fixed?

arantir123 commented 1 year ago

Thank you. Seems that the issue has been solved.