class_docstr: Dataset to read the score file containing the beams and their score
  
  Args:
      data_path: path to the beams file
      tokenizer: tokenizer of the LM model
      manifest_path: manifest `.json` file which contains the ground truths transcripts
      beam_size: the number of beams per sample
      max_seq_length: the maximum length of sequences
class_docstr_tok: ["Dataset","to","read","the","score","file","containing","the","beams","and","their","score","Args",":","data_path",":","path","to","the","beams","file","tokenizer",":","tokenizer","of","the","LM","model","manifest_path",":","manifest","`",".json","`","file","which","contains","the","ground","truths","transcripts","beam_size",":","the","number","of","beams","per","sample","max_seq_length",":","the","maximum","length","of","sequences"]
code: def __init__(
      self,
      data_path,
      tokenizer,
      manifest_path,
      beam_size=128,
      max_seq_length=256,
  ):
      self.data = pd.read_csv(data_path, delimiter="\t", header=None)
      self.tokenizer = tokenizer
      self.ground_truths = []
      with open(manifest_path, "r", encoding="utf-8") as f_orig:
          for line in f_orig:
              item = json.loads(line)
              self.ground_truths.append(item["text"])
      self.beam_size = beam_size
      self.max_seq_length = max_seq_length
  
      if self.tokenizer.pad_id is not None:
          self.pad_id = self.tokenizer.pad_id
      elif self.tokenizer.eos_id is not None:
          self.pad_id = self.tokenizer.eos_id
      else:
          logging.warning(
              f"Using 0 as pad_id as the tokenizer has no pad_id or eos_id."
          )
          self.pad_id = 0
  
imports: import contextlib
  import inspect
  import json
  from argparse import ArgumentParser
  import editdistance
  import matplotlib.pyplot
  import numpy
  import pandas
  import torch
  import tqdm
  from transformers import AutoModelForCausalLM
  from nemo.collections.nlp.models.language_modeling import TransformerLMModel
  from nemo.collections.nlp.modules.common.tokenizer_utils import get_tokenizer
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new BeamScoresDataset object from inherited base classes: torch.utils.data with example: obj = BeamScoresDataset(data_path, tokenizer, manifest_path, beam_size, max_seq_length)