Detectron2 how to send batch of data to custom mapper


I am training to send data to custom mapper that apply transforms.My data is a list of json having filename bounding,box and different annotations.How am I supposed to send a batch of data to the mapper function,instead of looping.