class_docstr: Base dataloader for the Jigsaw Toxic Comment Classification Challenges.
class_docstr_tok: ["Base","dataloader","for","the","Jigsaw","Toxic","Comment","Classification","Challenges","."]
code: def __init__(
      self,
      train_csv_file,
      test_csv_file,
      train=True,
      add_test_labels=False,
  ):
      if train:
          self.train_set_pd = self.load_data(train_csv_file)
          self.train_set = datasets.Dataset.from_pandas(
              self.train_set_pd
          )
          self.data = self.train_set
      else:
          self.data = self.load_val(
              test_csv_file, add_labels=add_test_labels
          )
  
      self.train = train
  
imports: import datasets
  import numpy
  import pandas
  import torch
  from torch.utils.data.dataset import Dataset
  from tqdm import tqdm
label_desc: Use image node_id 1 to create a new JigsawData object from inherited base classes: Dataset with example: obj = JigsawData(train_csv_file, test_csv_file, train, add_test_labels)