class_docstr: Dataset used to parallelize the transformation of the dataset via a DataLoader
docstr: Extract a training set from the dSprites dataset
docstr_tok: ["Extract","a","training","set","from","the","dSprites","dataset"]
code: def _get_training_set_ids(self, ratio: float) -> Set[int]:
      """
      Extract a training set from the dSprites dataset
      """
      nb_samples = len(self.dataset)
      permutation = np.random.permutation(nb_samples)
      threshold = int(round(nb_samples * ratio))
      return set(permutation[:threshold])
  
imports: import argparse
  import os
  from typing import Set
  import numpy
  from PIL import Image
  from torch.utils.data import DataLoader, Dataset
  from tqdm import tqdm
  from vissl.utils.download import download_and_extract_archive
label_desc: Use image node_id 4 for calling the DSpritesMapper obj's underlying member method code with example usage: obj._get_training_set_ids(ratio) and returns: set