def __init__(self, tokenizer, data_prefix, indexed_dataset, max_seq_length=512, mask_lm_prob=0.15, short_seq_prob=0.0, max_preds_per_seq=None, seed=1234, binary_head=True):
    self.seed = seed
    self.mask_lm_prob = mask_lm_prob
    self.max_seq_length = max_seq_length
    self.short_seq_prob = short_seq_prob
    self.binary_head = binary_head
    if (max_preds_per_seq is None):
        max_preds_per_seq = (math.ceil(((max_seq_length * mask_lm_prob) / 10)) * 10)
    self.max_preds_per_seq = max_preds_per_seq
    self.dataset = SentenceIndexedDataset(data_prefix, indexed_dataset, max_seq_length=(self.max_seq_length - 3), short_seq_prob=self.short_seq_prob, binary_head=self.binary_head)
    self.tokenizer = tokenizer
    self.vocab_id_list = list(tokenizer.get_vocab().values())
    self.cls_id = tokenizer.cls_token_id
    self.sep_id = tokenizer.sep_token_id
    self.mask_id = tokenizer.mask_token_id
    self.pad_id = tokenizer.pad_token_id
def __init__(self, tokenizer, data_prefix, indexed_dataset, max_seq_length=512, mask_lm_prob=0.15, short_seq_prob=0.0, max_preds_per_seq=None, seed=1234, binary_head=True):
    self.seed = seed
    self.mask_lm_prob = mask_lm_prob
    self.max_seq_length = max_seq_length
    self.short_seq_prob = short_seq_prob
    self.binary_head = binary_head
    if (max_preds_per_seq is None):
        max_preds_per_seq = (math.ceil(((max_seq_length * mask_lm_prob) / 10)) * 10)
    self.max_preds_per_seq = max_preds_per_seq
    self.dataset = SentenceIndexedDataset(data_prefix, indexed_dataset, max_seq_length=(self.max_seq_length - 3), short_seq_prob=self.short_seq_prob, binary_head=self.binary_head)
    self.tokenizer = tokenizer
    self.vocab_id_list = list(tokenizer.get_vocab().values())
    self.cls_id = tokenizer.cls_token_id
    self.sep_id = tokenizer.sep_token_id
    self.mask_id = tokenizer.mask_token_id
    self.pad_id = tokenizer.pad_token_id