class_docstr: Base class for all RequestBuilders.
class_docstr_tok: ["Base","class","for","all","RequestBuilders","."]
docstr: Fill self._records from TF Dataset.
docstr_tok: ["Fill","self._records","from","TF","Dataset","."]
code: def _ReadFromDataset(self, dataset: tf.data.Dataset):
      """Fill self._records from TF Dataset."""
      dataset = dataset.take(1)
      if tf.executing_eagerly():
          for d in dataset:
              self._records.extend(d[_RAW_RECORDS_COLUMN].numpy())
      else:
          it = tf.compat.v1.data.make_one_shot_iterator(dataset)
          next_el = it.get_next()
          with tf.compat.v1.Session() as sess:
              while True:
                  try:
                      d = sess.run(next_el)
                      self._records.extend(d[_RAW_RECORDS_COLUMN])
                  except tf.errors.OutOfRangeError:
                      break
  
imports: import abc
  import os
  from typing import Any, Iterable, List, Mapping, Optional
  from absl import logging
  import tensorflow
  from tfx import types
  from tfx.components.infra_validator import types
  from tfx.components.util import examples_utils
  from tfx.components.util import tfxio_utils
  from tfx.dsl.io import fileio
  from tfx.proto import example_gen_pb2
  from tfx.proto import infra_validator_pb2
  from tfx.types import artifact_utils
  from tfx.utils import path_utils
  from tfx_bsl.tfxio import dataset_options
  from tensorflow.python.saved_model import loader_impl
  from tensorflow_serving.apis import classification_pb2
  from tensorflow_serving.apis import predict_pb2
  from tensorflow_serving.apis import regression_pb2
label_desc: Use image node_id 3 for calling the _BaseRequestBuilder obj's underlying member method code with example usage: obj._ReadFromDataset(dataset) without return types