docstr: Update data directory and get data stats with Data Descriptor
  Weights are later used to setup loss
  
  Args:
      data_dir: path to data directory
docstr_tok: ["Update","data","directory","and","get","data","stats","with","Data","Descriptor","Weights","are","later","used","to","setup","loss","Args",":","data_dir",":","path","to","data","directory"]
code: def update_data_dir(self, data_dir: str) -> None:
      """
      Update data directory and get data stats with Data Descriptor
      Weights are later used to setup loss
  
      Args:
          data_dir: path to data directory
      """
      self._cfg.dataset.data_dir = data_dir
      logging.info(f"Setting model.dataset.data_dir to {data_dir}.")
      if self.task_name == "mnli":
          self._cfg.validation_ds.ds_item = [
              os.path.join(data_dir, "dev_matched.tsv"),
              os.path.join(data_dir, "dev_mismatched.tsv"),
          ]
      else:
          self._cfg.validation_ds.ds_item = os.path.join(
              data_dir, "dev.tsv"
          )
  
      self._cfg.train_ds.ds_item = os.path.join(data_dir, "train.tsv")
      logging.info(
          f"Using {self._cfg.validation_ds.ds_item} for model evaluation."
      )
  
imports: import os
  from typing import Dict, Optional, Union
  import numpy
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from nemo.collections.common.losses import CrossEntropyLoss, MSELoss
  from nemo.collections.nlp.data.glue_benchmark.glue_benchmark_dataset import GLUE_TASKS_NUM_LABELS, GLUEDataset
  from nemo.collections.nlp.models.glue_benchmark.metrics_for_glue import compute_metrics
  from nemo.collections.nlp.models.nlp_model import NLPModel
  from nemo.collections.nlp.modules.common import SequenceClassifier, SequenceRegression
  from nemo.collections.nlp.parts.utils_funcs import list2str, tensor2list
  from nemo.core.classes import typecheck
  from nemo.core.neural_types import NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 5 for calling the GLUEModel obj's underlying member method code with example usage: obj.update_data_dir(data_dir) without return types