class_docstr: Wrapper for TFX-BSL bulk inference implementation.
class_docstr_tok: ["Wrapper","for","TFX-BSL","bulk","inference","implementation","."]
docstr: Converts TFMA config into library-specific configuration.
  
  Args:
    model_specs: TFMA ModelSpec config to be translated to TFX-BSL Config.
    name_to_eval_shared_model: Map of model name to associated EvalSharedModel
      object.
docstr_tok: ["Converts","TFMA","config","into","library-specific","configuration",".","Args",":","model_specs",":","TFMA","ModelSpec","config","to","be","translated","to","TFX-BSL","Config",".","name_to_eval_shared_model",":","Map","of","model","name","to","associated","EvalSharedModel","object","."]
code: def __init__(
      self,
      model_specs: List[config_pb2.ModelSpec],
      name_to_eval_shared_model: Dict[str, types.EvalSharedModel],
  ):
      """Converts TFMA config into library-specific configuration.
  
      Args:
        model_specs: TFMA ModelSpec config to be translated to TFX-BSL Config.
        name_to_eval_shared_model: Map of model name to associated EvalSharedModel
          object.
      """
      super().__init__()
      model_names = []
      inference_specs = []
      for model_spec in model_specs:
          eval_shared_model = model_util.get_eval_shared_model(
              model_spec.name, name_to_eval_shared_model
          )
          inference_spec_type = model_spec_pb2.InferenceSpecType(
              saved_model_spec=model_spec_pb2.SavedModelSpec(
                  model_path=eval_shared_model.model_path,
                  tag=eval_shared_model.model_loader.tags,
                  signature_name=[model_spec.signature_name],
              ),
              batch_parameters=model_spec_pb2.BatchParameters(
                  min_batch_size=model_spec.inference_batch_size,
                  max_batch_size=model_spec.inference_batch_size,
              ),
          )
          model_names.append(model_spec.name)
          inference_specs.append(inference_spec_type)
      self._aligned_model_names = tuple(model_names)
      self._aligned_inference_specs = tuple(inference_specs)
  
file_path: model-analysis/tensorflow_model_analysis/extractors/tfx_bsl_predictions_extractor.py
imports: import copy
  from typing import Dict, Iterable, List, Optional, Tuple, TypeVar, Union
  import apache_beam
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.extractors import extractor
  from tensorflow_model_analysis.extractors import inference_base
  from tensorflow_model_analysis.extractors import predictions_extractor
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import model_util
  from tfx_bsl.public.beam import run_inference
  from tfx_bsl.public.proto import model_spec_pb2
  from tensorflow_serving.apis import prediction_log_pb2
label_desc: Use image node_id 1 to create a new TfxBslInferenceWrapper object from inherited base classes: beam with example: obj = TfxBslInferenceWrapper(model_specs, name_to_eval_shared_model)