docstr: Currently this method does not support character models.
docstr_tok: ["Currently","this","method","does","not","support","character","models","."]
code: def load_dataset(
      self,
      split,
      src_bin_path,
      tgt_bin_path,
      weights_file=None,
      is_train=False,
  ):
      """
      Currently this method does not support character models.
      """
      corpus = pytorch_translate_data.ParallelCorpusConfig(
          source=pytorch_translate_data.CorpusConfig(
              dialect=self.args.source_lang, data_file=src_bin_path
          ),
          target=pytorch_translate_data.CorpusConfig(
              dialect=self.args.target_lang, data_file=tgt_bin_path
          ),
          weights_file=weights_file,
      )
  
      if self.args.log_verbose:
          print("Starting to load binarized data files.", flush=True)
      data_utils.validate_corpus_exists(corpus=corpus, split=split)
  
      dst_dataset = pytorch_translate_data.InMemoryIndexedDataset.create_from_file(
          corpus.target.data_file
      )
      src_dataset = pytorch_translate_data.InMemoryIndexedDataset.create_from_file(
          corpus.source.data_file
      )
      if is_train:
          self.datasets[split] = TeacherDataset(
              src=src_dataset,
              src_sizes=src_dataset.sizes,
              src_dict=self.src_dict,
              tgt=dst_dataset,
              tgt_sizes=dst_dataset.sizes,
              tgt_dict=self.tgt_dict,
              top_k_probs_binary_file=self.top_k_probs_binary_file,
              teacher_models=self.teacher_models,
              top_k_teacher_tokens=self.top_k_teacher_tokens,
              top_k_teacher_scores=self.top_k_teacher_scores,
              top_k_teacher_indices=self.top_k_teacher_indices,
              left_pad_source=False,
          )
      else:
          self.datasets[
              split
          ] = weighted_data.WeightedLanguagePairDataset(
              src=src_dataset,
              src_sizes=src_dataset.sizes,
              src_dict=self.src_dict,
              tgt=dst_dataset,
              tgt_sizes=dst_dataset.sizes,
              tgt_dict=self.tgt_dict,
              weights=None,
              left_pad_source=False,
          )
  
      if self.args.log_verbose:
          print("Finished loading dataset", flush=True)
  
      print(f"| {split} {len(self.datasets[split])} examples")
  
file_path: translate/pytorch_translate/tasks/knowledge_distillation_task.py
imports: from typing import Dict
  import numpy
  import torch
  from fairseq.tasks import register_task
  from pytorch_translate import constants, utils
  from pytorch_translate.data import data, utils, weighted_data
  from pytorch_translate.research.knowledge_distillation.teacher_score_data import TeacherDataset
  from pytorch_translate.tasks.pytorch_translate_task import PytorchTranslateTask
label_desc: Use image node_id 3 for calling the PytorchKnowledgeDistillationTask obj's underlying member method code with example usage: obj.load_dataset(split, src_bin_path, tgt_bin_path, weights_file, is_train) without return types