class_docstr: GLUE Model that Inherits from MegatronT5SFTModel and overrides the dataset building.
code: def build_train_valid_test_datasets(self, stage):
      logging.info("Building GLUE/XNLI datasets.")
      if stage != "test":
          # Wrap this in a list since the general finetuning parent class supports multi-validation.
          self._validation_ds = [
              self._build_dataset(
                  self.cfg.data.validation_ds,
                  check_implict_grad_acc=True,
              )
          ]
          logging.info(
              f"Length of val dataset: {len(self._validation_ds[0])}"
          )
  
      if stage != "validate":
          if hasattr(self.cfg.data, "test_ds"):
              # Wrap this in a list since the general finetuning parent class supports multi-validation.
              self._test_ds = [
                  self._build_dataset(
                      self.cfg.data.test_ds, check_implict_grad_acc=True
                  )
              ]
              logging.info(
                  f"Length of test dataset: {len(self._test_ds[0])}"
              )
  
      if stage == "validate" or stage == "test":
          return
      self._train_ds = self._build_dataset(
          self.cfg.data.train_ds, check_implict_grad_acc=False
      )
      logging.info(f"Length of train dataset: {len(self._train_ds)}")
      logging.info(f"Finished building GLUE/XNLI datasets.")
  
file_path: NeMo/nemo/collections/nlp/models/language_modeling/megatron_glue_model.py
imports: from omegaconf.dictconfig import DictConfig
  from pytorch_lightning.trainer.trainer import Trainer
  from nemo.collections.nlp.data.glue_benchmark.glue_benchmark_dataset import TextToTextGLUEDataset, TextToTextXNLIDataset
  from nemo.collections.nlp.models.language_modeling.megatron_t5_sft_model import MegatronT5SFTModel
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling the MegatronT5GLUEModel obj's underlying member method code with example usage: obj.build_train_valid_test_datasets(stage) without return types