def load_label_names(
    config: ml_collections.ConfigDict) -> Optional[Dict[int, str]]:
  """Load label name mapping for the current dataset."""
  dataset_name = config.dataset_configs.get('dataset_name', config.dataset_name)
  if config.dataset_configs.get('label_dir') is None:
    return
  label_path = f'{config.dataset_configs.label_dir}/{dataset_name}_labels.json'
  if not gfile.exists(label_path):
    return
  with gfile.GFile(label_path) as f:
    label_names = json.load(f)
  label_names = {int(k): v for k, v in label_names.items()}
  return label_names
Load label name mapping for the current dataset.
videogvt/train_lib/eval_utils.py