class_docstr: Open Retrieval Question Answering evaluation using Google NQ dataset.
class_docstr_tok: ["Open","Retrieval","Question","Answering","evaluation","using","Google","NQ","dataset","."]
code: def __init__(
      self, task_name, dataset_name, datapath, tokenizer, max_seq_length
  ):
      # Store inputs.
      self.task_name = task_name
      self.dataset_name = dataset_name
      self.tokenizer = tokenizer
      self.max_seq_length = max_seq_length
      print_rank_0(
          " > building {} dataset for {}:".format(
              self.task_name, self.dataset_name
          )
      )
      print_rank_0(datapath)
      self.samples = self.process_samples_from_single_path(datapath)
      print_rank_0(
          "  >> total number of samples: {}".format(len(self.samples))
      )
  
imports: from abc import ABC
  import csv
  from collections import OrderedDict
  import numpy
  import torch
  from torch.utils.data import DataLoader
  from torch.utils.data import Dataset, BatchSampler
  from megatron import print_rank_0, get_args, get_tokenizer
  from megatron.data.biencoder_dataset_utils import make_attention_mask
label_desc: Use image node_id 1 to create a new NQDataset object from inherited base classes: ABC, Dataset with example: obj = NQDataset(task_name, dataset_name, datapath, tokenizer, max_seq_length)