class_docstr: Builds datasets from feature specs.
  
  The `BaseDatasetBuilder` class is an abstract class inherit from
  `AbstractDatasetBuilder` to serve training and validation datasets and
  signatures for training `ModelFitPipeline`.
  
  To be implemented by subclasses:
  
    * `_features_and_labels()`: Contains the logic to map a dict of tensors of
    dataset to feature tensors and label tensors.
  
  Example subclass implementation:
  
  ```python
  class SimpleDatasetBuilder(BaseDatasetBuilder):
  
    def _features_and_labels(self, features):
      label = features.pop("utility")
      return features, label
  ```
class_docstr_tok: ["Builds","datasets","from","feature","specs",".","The","`","BaseDatasetBuilder","`","class","is","an","abstract","class","inherit","from","`","AbstractDatasetBuilder","`","to","serve","training","and","validation","datasets","and","signatures","for","training","`","ModelFitPipeline","`",".","To","be","implemented","by","subclasses",":","*","`","_features_and_labels","(",")","`",":","Contains","the","logic","to","map","a","dict","of","tensors","of","dataset","to","feature","tensors","and","label","tensors",".","Example","subclass","implementation",":","``","`","python","class","SimpleDatasetBuilder","(","BaseDatasetBuilder",")",":","def","_features_and_labels","(","self",",","features",")",":","label","=","features.pop","(","``","utility","''",")","return","features",",","label","``","`"]
docstr: See `AbstractDatasetBuilder`.
code: def build_signatures(self, model: tf.keras.Model) -> Any:
      """See `AbstractDatasetBuilder`."""
      return saved_model.Signatures(
          model,
          context_feature_spec=self._context_feature_spec,
          example_feature_spec=self._example_feature_spec,
          mask_feature_name=self._mask_feature_name,
      )()
  
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 6 for calling the BaseDatasetBuilder obj's underlying member method code with example usage: obj.build_signatures(model) and returns: saved_model