class_docstr: DatasetBuilder for imagenet_pi dataset.
class_docstr_tok: ["DatasetBuilder","for","imagenet_pi","dataset","."]
docstr: Returns SplitGenerators.
docstr_tok: ["Returns","SplitGenerators","."]
code: def _split_generators(
      self, dl_manager: tfds.download.DownloadManager
  ):
      """Returns SplitGenerators."""
  
      train_path = dl_manager.manual_dir / "ILSVRC2012_img_train.tar"
      val_path = dl_manager.manual_dir / "ILSVRC2012_img_val.tar"
  
      if not train_path.exists() or not val_path.exists():
          raise AssertionError(
              "ImageNet-PI requires manual download of the ImageNet2012 data. "
              "Please download the train and val set and place them into:"
              "{}, {}".format(train_path, val_path)
          )
  
      return {
          "train": self._generate_examples(
              archive=dl_manager.iter_archive(train_path),
              annotator_labels=self._get_train_annotator_labels(
                  dl_manager
              ),
              annotator_confidences=self._get_train_annotator_confidences(
                  dl_manager
              ),
              validation_labels=None,
          ),
          "validation": self._generate_examples(
              archive=dl_manager.iter_archive(val_path),
              annotator_labels=self._get_validation_annotator_labels(
                  dl_manager
              ),
              annotator_confidences=self._get_validation_annotator_confidences(
                  dl_manager
              ),
              validation_labels=imagenet_common.get_validation_labels(
                  val_path
              ),
          ),
      }
  
file_path: datasets/tensorflow_datasets/datasets/imagenet_pi/imagenet_pi_dataset_builder.py
imports: import io
  import os
  from etils import epath
  import numpy
  from tensorflow_datasets.datasets.imagenet2012 import imagenet_common
  import tensorflow_datasets.public_api
label_desc: Use image node_id 8 for calling the Builder obj's underlying member method code with example usage: obj._split_generators(dl_manager) and returns: dict