class_docstr: `ImageNetv2 Dataset <https://arxiv.org/abs/1902.10811>`_ for studying the robustness of models trained on ImageNet dataset
  
  Args:
      opts: command-line arguments
class_docstr_tok: ["`","ImageNetv2","Dataset","<","https",":","\/\/arxiv.org\/abs\/1902.10811",">","`","_","for","studying","the","robustness","of","models","trained","on","ImageNet","dataset","Args",":","opts",":","command-line","arguments"]
docstr: Add dataset-specific arguments to the parser.
docstr_tok: ["Add","dataset-specific","arguments","to","the","parser","."]
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      """Add dataset-specific arguments to the parser."""
      if cls != Imagenetv2Dataset:
          # Don't re-register arguments in subclasses that don't override `add_arguments()`.
          return parser
      group = parser.add_argument_group(title=cls.__name__)
      group.add_argument(
          "--dataset.imagenet-v2.split",
          type=str,
          default="matched-frequency",
          help="ImageNetv2 dataset. Possible choices are: {}".format(
              [
                  f"{i + 1}: {split_name}"
                  for i, split_name in enumerate(
                      IMAGENETv2_SPLIT_LINK_MAP.keys()
                  )
              ]
          ),
          choices=IMAGENETv2_SPLIT_LINK_MAP.keys(),
      )
      return parser
  
file_path: ml-cvnets/data/datasets/classification/imagenet_v2.py
imports: import argparse
  import tarfile
  from pathlib import Path
  from typing import Dict, Tuple
  import torch
  from data.datasets import DATASET_REGISTRY
  from data.datasets.dataset_base import BaseImageDataset
  from data.transforms import image_pil
  from data.transforms.common import Compose
  from utils import logger
  from utils.download_utils import get_local_path
label_desc: Use image node_id 2 for calling the Imagenetv2Dataset obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser, parser