class_docstr: A wrapper Dataset for masked language modeling.
  
  Input items are masked according to the specified masking probability.
  
  Args:
      dataset: Dataset to wrap.
      sizes: Sentence lengths
      vocab: Dictionary with the vocabulary and special tokens.
      pad_idx: Id of pad token in vocab
      mask_idx: Id of mask token in vocab
      return_masked_tokens: controls whether to return the non-masked tokens
          (the default) or to return a tensor with the original masked token
          IDs (and *pad_idx* elsewhere). The latter is useful as targets for
          masked LM training.
      seed: Seed for random number generator for reproducibility.
      mask_prob: probability of replacing a token with *mask_idx*.
      leave_unmasked_prob: probability that a masked token is unmasked.
      random_token_prob: probability of replacing a masked token with a
          random token from the vocabulary.
      freq_weighted_replacement: sample random replacement words based on
          word frequencies in the vocab.
      mask_whole_words: only mask whole words. This should be a byte mask
          over vocab indices, indicating whether it is the beginning of a
          word. We will extend any mask to encompass the whole word.
      bpe: BPE to use for whole-word masking.
      mask_multiple_length : repeat each mask index multiple times. Default
          value is 1.
      mask_stdev : standard deviation of masks distribution in case of
          multiple masking. Default value is 0.
class_docstr_tok: ["A","wrapper","Dataset","for","masked","language","modeling",".","Input","items","are","masked","according","to","the","specified","masking","probability",".","Args",":","dataset",":","Dataset","to","wrap",".","sizes",":","Sentence","lengths","vocab",":","Dictionary","with","the","vocabulary","and","special","tokens",".","pad_idx",":","Id","of","pad","token","in","vocab","mask_idx",":","Id","of","mask","token","in","vocab","return_masked_tokens",":","controls","whether","to","return","the","non-masked","tokens","(","the","default",")","or","to","return","a","tensor","with","the","original","masked","token","IDs","(","and","*","pad_idx","*","elsewhere",")",".","The","latter","is","useful","as","targets","for","masked","LM","training",".","seed",":","Seed","for","random","number","generator","for","reproducibility",".","mask_prob",":","probability","of","replacing","a","token","with","*","mask_idx","*",".","leave_unmasked_prob",":","probability","that","a","masked","token","is","unmasked",".","random_token_prob",":","probability","of","replacing","a","masked","token","with","a","random","token","from","the","vocabulary",".","freq_weighted_replacement",":","sample","random","replacement","words","based","on","word","frequencies","in","the","vocab",".","mask_whole_words",":","only","mask","whole","words",".","This","should","be","a","byte","mask","over","vocab","indices",",","indicating","whether","it","is","the","beginning","of","a","word",".","We","will","extend","any","mask","to","encompass","the","whole","word",".","bpe",":","BPE","to","use","for","whole-word","masking",".","mask_multiple_length",":","repeat","each","mask","index","multiple","times",".","Default","value","is","1.","mask_stdev",":","standard","deviation","of","masks","distribution","in","case","of","multiple","masking",".","Default","value","is","0","."]
code: def can_reuse_epoch_itr_across_epochs(self):
      return True
  
file_path: fairseq/fairseq/data/mask_tokens_dataset.py
imports: from functools import lru_cache
  import numpy
  import torch
  from fairseq.data import Dictionary, data_utils
  from .None import BaseWrapperDataset, LRUCacheDataset
label_desc: Use image node_id 3 for calling the MaskTokensDataset obj's underlying member method code with example usage: obj.can_reuse_epoch_itr_across_epochs() and returns: True