class_docstr: Interface for datasets and signatures.
  
  The `AbstractDatasetBuilder` class is an abstract class to serve data in
  tfr.keras. A `DatasetBuilder` will be passed to an instance of
  `AbstractPipeline` and called to serve the training and validation datasets
  and to define the serving signatures for saved models to treat the
  corresponding format of data.
  
  To be implemented by subclasses:
  
    * `build_train_dataset()`: Contains the logic to build a `tf.data.Dataset`
    for training.
    * `build_valid_dataset()`: Contains the logic to build a `tf.data.Dataset`
    for validation.
    * `build_signatures()`: Contains the logic to build a dict of signatures
    that formulate the model in functions that render the input data with given
    format.
  
  Example subclass implementation:
  
  ```python
  class NullDatasetBuilder(AbstractDatasetBuilder):
  
    def __init__(self, train_dataset, valid_dataset, signatures=None):
      self._train_dataset = train_dataset
      self._valid_dataset = valid_dataset
      self._signatures = signatures
  
    def build_train_dataset(self, *arg, **kwargs) -> tf.data.Dataset:
      return self._train_dataset
  
    def build_valid_dataset(self, *arg, **kwargs) -> tf.data.Dataset:
      return self._valid_dataset
  
    def build_signatures(self, *arg, **kwargs) -> Any:
      return self._signatures
  ```
class_docstr_tok: ["Interface","for","datasets","and","signatures",".","The","`","AbstractDatasetBuilder","`","class","is","an","abstract","class","to","serve","data","in","tfr.keras",".","A","`","DatasetBuilder","`","will","be","passed","to","an","instance","of","`","AbstractPipeline","`","and","called","to","serve","the","training","and","validation","datasets","and","to","define","the","serving","signatures","for","saved","models","to","treat","the","corresponding","format","of","data",".","To","be","implemented","by","subclasses",":","*","`","build_train_dataset","(",")","`",":","Contains","the","logic","to","build","a","`","tf.data.Dataset","`","for","training",".","*","`","build_valid_dataset","(",")","`",":","Contains","the","logic","to","build","a","`","tf.data.Dataset","`","for","validation",".","*","`","build_signatures","(",")","`",":","Contains","the","logic","to","build","a","dict","of","signatures","that","formulate","the","model","in","functions","that","render","the","input","data","with","given","format",".","Example","subclass","implementation",":","``","`","python","class","NullDatasetBuilder","(","AbstractDatasetBuilder",")",":","def","__init__","(","self",",","train_dataset",",","valid_dataset",",","signatures=None",")",":","self._train_dataset","=","train_dataset","self._valid_dataset","=","valid_dataset","self._signatures","=","signatures","def","build_train_dataset","(","self",",","*","arg",",","*","*","kwargs",")","-",">","tf.data.Dataset",":","return","self._train_dataset","def","build_valid_dataset","(","self",",","*","arg",",","*","*","kwargs",")","-",">","tf.data.Dataset",":","return","self._valid_dataset","def","build_signatures","(","self",",","*","arg",",","*","*","kwargs",")","-",">","Any",":","return","self._signatures","``","`"]
docstr: Returns the validation dataset.
  
  Example usage:
  
  ```python
  dataset_builder = NullDatasetBuilder(train_data, valid_data)
  valid_dataset = dataset_builder.build_valid_dataset()
  ```
  
  Args:
    *arg: arguments that might be used to build validation dataset.
    **kwargs: keyword arguments that might be used to build validation
      dataset.
  
  Returns:
    A `tf.data.Dataset`.
code: def build_valid_dataset(self, *arg, **kwargs) -> tf.data.Dataset:
      """Returns the validation dataset.
  
      Example usage:
  
      ```python
      dataset_builder = NullDatasetBuilder(train_data, valid_data)
      valid_dataset = dataset_builder.build_valid_dataset()
      ```
  
      Args:
        *arg: arguments that might be used to build validation dataset.
        **kwargs: keyword arguments that might be used to build validation
          dataset.
  
      Returns:
        A `tf.data.Dataset`.
      """
      raise NotImplementedError("Calling an abstract method.")
  
imports: import abc
  import dataclasses
  import os
  from typing import Any, Dict, List, Optional, Tuple, Union
  import tensorflow
  from tensorflow_ranking.python import data
  from tensorflow_ranking.python.keras import losses
  from tensorflow_ranking.python.keras import metrics
  from tensorflow_ranking.python.keras import model
  from tensorflow_ranking.python.keras import saved_model
  from tensorflow_ranking.python.keras import strategy_utils
label_desc: Use image node_id 2 for calling the AbstractDatasetBuilder obj's underlying member method code with example usage: obj.build_valid_dataset() without return types