'Launch background threads for loading the data.'

def start(self):

    if (not os.path.exists(self.archive_dir)):
        logger.warning(('%s    not    found.    Triggering    data    ingest...' % self.archive_dir))
        os.makedirs(self.archive_dir)
    if (self.item_count.value == 0):
        indexer = Indexer(self.repo_dir, self.index_file)
        indexer.run()
    datum_dtype_size = np.dtype(self.datum_dtype).itemsize
    target_dtype_size = np.dtype(self.target_dtype).itemsize
    if (self.ingest_params is None):
        ingest_params = ct.POINTER(MediaParams)()
    else:
        ingest_params = ct.POINTER(MediaParams)(self.ingest_params)
    self.loader = self.loaderlib.start(ct.byref(self.item_count), self.bsz, ct.c_char_p(self.repo_dir.encode()), ct.c_char_p(self.archive_dir.encode()), ct.c_char_p(self.index_file.encode()), ct.c_char_p(self.archive_prefix.encode()), self.shuffle, self.reshuffle, self.macro_start, ct.c_int(self.datum_size), ct.c_int(datum_dtype_size), ct.c_int(self.target_size), ct.c_int(target_dtype_size), ct.c_int(self.target_conversion), self.subset_percent, ct.POINTER(MediaParams)(self.media_params), ct.POINTER(DeviceParams)(self.device_params), ingest_params, self.alphabet)
    self.ndata = self.item_count.value
    if (self.loader is None):
        raise RuntimeError('Failed    to    start    data    loader.')
