class_docstr: Translation (Sequence Generation) task for Levenshtein Transformer
  See `"Levenshtein Transformer" <https://arxiv.org/abs/1905.11006>`_.
class_docstr_tok: ["Translation","(","Sequence","Generation",")","task","for","Levenshtein","Transformer","See","`","``","Levenshtein","Transformer","''","<","https",":","\/\/arxiv.org\/abs\/1905.11006",">","`","_","."]
docstr: Load a given dataset split.
  
  Args:
      split (str): name of the split (e.g., train, valid, test)
docstr_tok: ["Load","a","given","dataset","split",".","Args",":","split","(","str",")",":","name","of","the","split","(","e.g.",",","train",",","valid",",","test",")"]
code: def load_dataset(self, split, epoch=1, combine=False, **kwargs):
      """Load a given dataset split.
  
      Args:
          split (str): name of the split (e.g., train, valid, test)
      """
      paths = utils.split_paths(self.cfg.data)
      assert len(paths) > 0
      data_path = paths[(epoch - 1) % len(paths)]
  
      # infer langcode
      src, tgt = self.cfg.source_lang, self.cfg.target_lang
  
      self.datasets[split] = load_langpair_dataset(
          data_path,
          split,
          src,
          self.src_dict,
          tgt,
          self.tgt_dict,
          combine=combine,
          dataset_impl=self.cfg.dataset_impl,
          upsample_primary=self.cfg.upsample_primary,
          left_pad_source=self.cfg.left_pad_source,
          left_pad_target=self.cfg.left_pad_target,
          max_source_positions=self.cfg.max_source_positions,
          max_target_positions=self.cfg.max_target_positions,
          prepend_bos=True,
      )
  
file_path: fairseq/fairseq/tasks/translation_lev.py
imports: from dataclasses import dataclass, field
  import torch
  from fairseq import utils
  from fairseq.data import LanguagePairDataset
  from fairseq.dataclass import ChoiceEnum
  from fairseq.tasks import register_task
  from fairseq.tasks.translation import TranslationConfig, TranslationTask, load_langpair_dataset
  from fairseq.utils import new_arange
label_desc: Use image node_id 1 for calling the TranslationLevenshteinTask obj's underlying member method code with example usage: obj.load_dataset(split, epoch, combine) without return types