class_docstr: Base class for classes representing a dataset for the benchmark.
class_docstr_tok: ["Base","class","for","classes","representing","a","dataset","for","the","benchmark","."]
docstr: Construct a dataset instance.
  
  Args:
    base_dir: The directory in which datasets artifacts are located. This will
      be used for reading during benchmark execution, as well as writing
      during benchmark regeneration. By default, the directory in which this
      file is located at runtime will be used to infer the location of
      `tfx/benchmarks/datasets`.
docstr_tok: ["Construct","a","dataset","instance",".","Args",":","base_dir",":","The","directory","in","which","datasets","artifacts","are","located",".","This","will","be","used","for","reading","during","benchmark","execution",",","as","well","as","writing","during","benchmark","regeneration",".","By","default",",","the","directory","in","which","this","file","is","located","at","runtime","will","be","used","to","infer","the","location","of","`","tfx\/benchmarks\/datasets","`","."]
code: def __init__(self, base_dir=None):
      """Construct a dataset instance.
  
      Args:
        base_dir: The directory in which datasets artifacts are located. This will
          be used for reading during benchmark execution, as well as writing
          during benchmark regeneration. By default, the directory in which this
          file is located at runtime will be used to infer the location of
          `tfx/benchmarks/datasets`.
      """
      self._base_dir = (
          base_dir
          if base_dir
          else os.path.join(os.path.dirname(__file__), "datasets")
      )
  
file_path: tfx/tfx/benchmarks/benchmark_dataset.py
imports: import os
  import tensorflow
label_desc: Use image node_id 1 to create a new BenchmarkDataset object  with example: obj = BenchmarkDataset(base_dir)