Unfortunately, I don’t have access to the parameters such as the learning rate. The only data I have are a the model and the optimizer, that’s why I would like to “reset” the optimizer itself. Currently what I do is the following:
self.optimizer.__setstate__({'state': defaultdict(dict)})

and then reuse the same optimizer. Could it be a solution?