Use scheduler with specific param_group of an optimizer

Hello,

I create an optimizer with different lrs for different parts of the model

optimizer = AdamW(
    [
        {'params': model.rnn.parameters(), 'lr': 3e-3},
        {'params': model.clf.parameters(), 'lr': 3e-4}
    ]
)

and I want to use a scheduler just for the RNN part of the model.

A possible solution is to create two optimizers but the code gets less clean. Is it possible to use a scheduler just for the RNN part without creating two optimizers?