class_docstr: Generic PyTorch-Lightning class that must be initialized with a PyTorch module.
class_docstr_tok: ["Generic","PyTorch-Lightning","class","that","must","be","initialized","with","a","PyTorch","module","."]
code: def configure_optimizers(self):
      no_decay_param = ["bias", "LayerNorm.weight"]
  
      optimizer_group_parameters = [
          {
              "params": [
                  p
                  for n, p in self.model.named_parameters()
                  if not any(nd in n for nd in no_decay_param)
              ],
              "weight_decay": self.args.weight_decay,
          },
          {
              "params": [
                  p
                  for n, p in self.model.named_parameters()
                  if any(nd in n for nd in no_decay_param)
              ],
              "weight_decay": 0,
          },
      ]
  
      optimizer = self.optimizer_class(
          optimizer_group_parameters, lr=self.lr, eps=1e-8
      )
      # scheduler = get_linear_schedule_with_warmup(optimizer, num_warmup_steps=self.num_training_steps * 0.1, num_training_steps=self.num_training_steps)
      return optimizer
      """return {
              "optimizer": optimizer, 
              "lr_scheduler":{
                  'scheduler': scheduler,
                  'interval': 'step',  # or 'epoch'
                  'frequency': 1,
              }
          }"""
  
file_path: DeepKE/src/deepke/relation_extraction/few_shot/lit_models/base.py
imports: import torch
  from transformers.optimization import get_linear_schedule_with_warmup
  from torch import nn
label_desc: Use image node_id 8 for calling the BaseLitModel obj's underlying member method code with example usage: obj.configure_optimizers() and returns: optimizer