From 911f3ef4a63665d06be10a981dbdca39d643b492 Mon Sep 17 00:00:00 2001 From: EnricoTrizio Date: Fri, 12 Jan 2024 17:42:06 +0100 Subject: [PATCH] Fix bug in lr scheduler configure --- mlcolvar/cvs/cv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlcolvar/cvs/cv.py b/mlcolvar/cvs/cv.py index cef2d742..f5f2b177 100644 --- a/mlcolvar/cvs/cv.py +++ b/mlcolvar/cvs/cv.py @@ -206,7 +206,7 @@ def configure_optimizers(self): if self.lr_scheduler_kwargs: scheduler_cls = self.lr_scheduler_kwargs['scheduler'] scheduler_kwargs = {k: v for k, v in self.lr_scheduler_kwargs.items() if k != 'scheduler'} - lr_scheduler = scheduler_cls(**scheduler_kwargs) + lr_scheduler = scheduler_cls(optimizer, **scheduler_kwargs) return [optimizer] , [lr_scheduler] else: return optimizer