docstr: ModelPT override for prompt learning. 
  Optimizer will get self._optimizer_param_groups. 
  Makes two optimizer param groups, one for the frozen model params
  and one for the prompt-table/prompt-encoder params. The learning 
  rate for the frozen model's params will always be zero effectively
  freezing the model's params but still allowing for the needed gradients
  to be passed around in pipeline parallel models. The prompt-encoder 
  and/or prompt table will use the learning rate set by the user. 
docstr_tok: ["ModelPT","override","for","prompt","learning",".","Optimizer","will","get","self._optimizer_param_groups",".","Makes","two","optimizer","param","groups",",","one","for","the","frozen","model","params","and","one","for","the","prompt-table\/prompt-encoder","params",".","The","learning","rate","for","the","frozen","model","'s","params","will","always","be","zero","effectively","freezing","the","model","'s","params","but","still","allowing","for","the","needed","gradients","to","be","passed","around","in","pipeline","parallel","models",".","The","prompt-encoder","and\/or","prompt","table","will","use","the","learning","rate","set","by","the","user","."]
code: def setup_optimizer_param_groups(self):
      """
      ModelPT override for prompt learning.
      Optimizer will get self._optimizer_param_groups.
      Makes two optimizer param groups, one for the frozen model params
      and one for the prompt-table/prompt-encoder params. The learning
      rate for the frozen model's params will always be zero effectively
      freezing the model's params but still allowing for the needed gradients
      to be passed around in pipeline parallel models. The prompt-encoder
      and/or prompt table will use the learning rate set by the user.
      """
      if not self.prompt_learning:
          super().setup_optimizer_param_groups()
          return
      # Freeze frozen model
      for param in self.language_model.frozen_model.parameters():
          param.requires_grad = False
  
      virtual_prompt_params = {"params": []}
  
      if self.language_model.frozen_model.model.pre_process:
          virtual_prompt_params["params"].extend(
              [
                  param
                  for param in self.language_model.prompt_table.parameters()
              ]
          )
  
          if (
              self.language_model.virtual_prompt_source
              == VirtualPromptSource.PROMPT_ENCODER
          ):
              virtual_prompt_params["params"].extend(
                  [
                      param
                      for param in self.language_model.prompt_encoder.parameters()
                  ]
              )
      self._optimizer_param_groups = (virtual_prompt_params,)
  
imports: import collections
  import copy
  import os
  import random
  from typing import Dict, Optional, Union
  import numpy
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from torch.utils.data import DataLoader
  from transformers import AutoModelWithLMHead
  from nemo.collections.nlp.data.dialogue import DialogueGPTClassificationDataset, DialogueSGDDataProcessor
  from nemo.collections.nlp.data.dialogue.data_processor.assistant_data_processor import DialogueAssistantDataProcessor
  from nemo.collections.nlp.data.dialogue.data_processor.design_data_processor import DialogueDesignDataProcessor
  from nemo.collections.nlp.metrics.classification_report import ClassificationReport
  from nemo.collections.nlp.metrics.dialogue_metrics import DialogueClassificationMetrics
  from nemo.collections.nlp.models.language_modeling.megatron_gpt_model import MegatronGPTModel
  from nemo.collections.nlp.models.language_modeling.megatron_gpt_prompt_learning_model import MegatronGPTPromptLearningModel
  from nemo.collections.nlp.models.nlp_model import NLPModel
  from nemo.collections.nlp.modules.common import VirtualPromptSource, VirtualPromptStyle
  from nemo.collections.nlp.modules.common.text_generation_utils import get_default_sampling_params, megatron_gpt_generate
  from nemo.collections.nlp.modules.common.transformer.text_generation import LengthParam
  from nemo.collections.nlp.parts.nlp_overrides import NLPSaveRestoreConnector
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling the DialogueGPTClassificationModel obj's underlying member method code with example usage: obj.setup_optimizer_param_groups() without return types