class_docstr: Dataloader for already preprocessed data in hdf5 files that is already in the format expected by BERT model.
class_docstr_tok: ["Dataloader","for","already","preprocessed","data","in","hdf5","files","that","is","already","in","the","format","expected","by","BERT","model","."]
docstr: Args:
      data_files: list of data files in hdf5 format with preprocessed data in array format
      max_predictions_per_seq: maximum number of masked tokens per sequence. Need to be consistent with data in input file.
      batch_size: batch size per gpu per forward pass
      seed: seed to ensure each gpu process opens the same data file in each iteration
docstr_tok: ["Args",":","data_files",":","list","of","data","files","in","hdf5","format","with","preprocessed","data","in","array","format","max_predictions_per_seq",":","maximum","number","of","masked","tokens","per","sequence",".","Need","to","be","consistent","with","data","in","input","file",".","batch_size",":","batch","size","per","gpu","per","forward","pass","seed",":","seed","to","ensure","each","gpu","process","opens","the","same","data","file","in","each","iteration"]
code: def __init__(
      self,
      data_files: List[str],
      max_predictions_per_seq: int,
      batch_size: int,
      seed: Optional[int] = 42,
  ):
      """
      Args:
          data_files: list of data files in hdf5 format with preprocessed data in array format
          max_predictions_per_seq: maximum number of masked tokens per sequence. Need to be consistent with data in input file.
          batch_size: batch size per gpu per forward pass
          seed: seed to ensure each gpu process opens the same data file in each iteration
      """
      super().__init__(None, batch_size=batch_size)
      self.random = random.Random(seed)
      self.data_files = data_files
      self.max_predictions_per_seq = max_predictions_per_seq
  
imports: import array
  import os
  import pickle
  import random
  from typing import Dict, List, Optional
  import h5py
  import numpy
  from torch.utils.data import DataLoader, DistributedSampler
  from tqdm import tqdm
  from nemo.collections.nlp.data.data_utils.data_preprocessing import find_newlines, load_data_indices
  from nemo.core.classes import Dataset
label_desc: Use image node_id 1 to create a new BertPretrainingPreprocessedDataloader object from inherited base classes: DataLoader with example: obj = BertPretrainingPreprocessedDataloader(data_files, max_predictions_per_seq, batch_size, seed)