class_docstr: Benchmarks for `tf.data.experimental.CsvDataset`.
class_docstr_tok: ["Benchmarks","for","`","tf.data.experimental.CsvDataset","`","."]
code: def _set_up(self, str_val):
      # Since this isn't test.TestCase, have to manually create a test dir
      gfile.MakeDirs(googletest.GetTempDir())
      self._temp_dir = tempfile.mkdtemp(dir=googletest.GetTempDir())
  
      self._num_cols = [4, 64, 256]
      self._num_per_iter = 5000
      self._filenames = []
      for n in self._num_cols:
          fn = os.path.join(self._temp_dir, "file%d.csv" % n)
          with open(fn, "w") as f:
              # Just write 100 rows and use `repeat`... Assumes the cost
              # of creating an iterator is not significant
              row = ",".join(str_val for _ in range(n))
              f.write("\n".join(row for _ in range(100)))
          self._filenames.append(fn)
  
file_path: tensorflow/tensorflow/python/data/experimental/benchmarks/csv_dataset_benchmark.py
imports: import os
  import string
  import tempfile
  from tensorflow.python.data.benchmarks import benchmark_base
  from tensorflow.python.data.experimental.ops import readers
  from tensorflow.python.data.ops import readers
  from tensorflow.python.ops import parsing_ops
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the CsvDatasetBenchmark obj's underlying member method code with example usage: obj._set_up(str_val) without return types