code: def __init__(self, config, set):
      super().__init__()
      self.config = config
      self.quick_test = config["quick_test"]
      if isinstance(self.quick_test, bool):
          self.quick_test = 32 if self.quick_test else 0
      self.set = set
      source_filename = os.path.join(config["data_path"], f"{set}.src")
      target_filename = os.path.join(config["data_path"], f"{set}.tgt")
  
      self.source_text = load_data(
          source_filename, max_length=self.quick_test
      )
      self.pretraining = config["pretrain_task"]
      self.is_casual_model = bool(config["model_name"] in CLM_MODELS)
      if self.pretraining is None and self.pretraining != "disabled":
          self.target_text = load_data(
              target_filename, max_length=self.quick_test
          )
      self.source_length = self.config["src_len"]
      self.target_length = self.config["tgt_len"]
      self.paired_text = bool(
          set == "train"
          or (
              self.set == "valid"
              and self.config["metrics_for_best_model"] == ["loss"]
          )
      )
      if self.paired_text and self.pretraining is None:
          assert len(self.source_text) == len(self.target_text)
  
file_path: TextBox/textbox/data/abstract_dataset.py
imports: import os
  import torch, warnings
  import math
  from torch.utils.data import DataLoader, Dataset
  from textbox import CLM_MODELS
  from typing import List
  from torch.nn.utils.rnn import pad_sequence
  from textbox.data.misc import load_data, _pad_sequence
label_desc: Use image node_id 1 to create a new AbstractDataset object from inherited base classes: Dataset with example: obj = AbstractDataset(config, set)