class_docstr: A ``Predictor`` implementation for inference against TensorFlow Serving endpoints.
docstr: Initialize a ``TensorFlowPredictor``.
  
  See :class:`~sagemaker.predictor.Predictor` for more info about parameters.
  
  Args:
      endpoint_name (str): The name of the endpoint to perform inference
          on.
      sagemaker_session (sagemaker.session.Session): Session object which
          manages interactions with Amazon SageMaker APIs and any other
          AWS services needed. If not specified, the estimator creates one
          using the default AWS configuration chain.
      serializer (callable): Optional. Default serializes input data to
          json. Handles dicts, lists, and numpy arrays.
      deserializer (callable): Optional. Default parses the response using
          ``json.load(...)``.
      model_name (str): Optional. The name of the SavedModel model that
          should handle the request. If not specified, the endpoint's
          default model will handle the request.
      model_version (str): Optional. The version of the SavedModel model
          that should handle the request. If not specified, the latest
          version of the model will be used.
      component_name (str): Optional. Name of the Amazon SageMaker inference
          component corresponding to the predictor.
docstr_tok: ["Initialize","a","``","TensorFlowPredictor","``",".","See",":","class",":","`","~sagemaker.predictor.Predictor","`","for","more","info","about","parameters",".","Args",":","endpoint_name","(","str",")",":","The","name","of","the","endpoint","to","perform","inference","on",".","sagemaker_session","(","sagemaker.session.Session",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed",".","If","not","specified",",","the","estimator","creates","one","using","the","default","AWS","configuration","chain",".","serializer","(","callable",")",":","Optional",".","Default","serializes","input","data","to","json",".","Handles","dicts",",","lists",",","and","numpy","arrays",".","deserializer","(","callable",")",":","Optional",".","Default","parses","the","response","using","``","json.load","(","...",")","``",".","model_name","(","str",")",":","Optional",".","The","name","of","the","SavedModel","model","that","should","handle","the","request",".","If","not","specified",",","the","endpoint's","default","model","will","handle","the","request",".","model_version","(","str",")",":","Optional",".","The","version","of","the","SavedModel","model","that","should","handle","the","request",".","If","not","specified",",","the","latest","version","of","the","model","will","be","used",".","component_name","(","str",")",":","Optional",".","Name","of","the","Amazon","SageMaker","inference","component","corresponding","to","the","predictor","."]
code: def __init__(
      self,
      endpoint_name,
      sagemaker_session=None,
      serializer=JSONSerializer(),
      deserializer=JSONDeserializer(),
      model_name=None,
      model_version=None,
      component_name=None,
      **kwargs,
  ):
      """Initialize a ``TensorFlowPredictor``.
  
      See :class:`~sagemaker.predictor.Predictor` for more info about parameters.
  
      Args:
          endpoint_name (str): The name of the endpoint to perform inference
              on.
          sagemaker_session (sagemaker.session.Session): Session object which
              manages interactions with Amazon SageMaker APIs and any other
              AWS services needed. If not specified, the estimator creates one
              using the default AWS configuration chain.
          serializer (callable): Optional. Default serializes input data to
              json. Handles dicts, lists, and numpy arrays.
          deserializer (callable): Optional. Default parses the response using
              ``json.load(...)``.
          model_name (str): Optional. The name of the SavedModel model that
              should handle the request. If not specified, the endpoint's
              default model will handle the request.
          model_version (str): Optional. The version of the SavedModel model
              that should handle the request. If not specified, the latest
              version of the model will be used.
          component_name (str): Optional. Name of the Amazon SageMaker inference
              component corresponding to the predictor.
      """
      removed_kwargs("content_type", kwargs)
      removed_kwargs("accept", kwargs)
      super(TensorFlowPredictor, self).__init__(
          endpoint_name,
          sagemaker_session,
          serializer,
          deserializer,
          component_name=component_name,
      )
  
      attributes = []
      if model_name:
          attributes.append("tfs-model-name={}".format(model_name))
      if model_version:
          attributes.append(
              "tfs-model-version={}".format(model_version)
          )
      self._model_attributes = (
          ",".join(attributes) if attributes else None
      )
  
imports: from __future__ import absolute_import
  import logging
  from typing import Union, Optional, List, Dict
  import sagemaker
  from sagemaker import image_uris, s3, ModelMetrics
  from sagemaker.deserializers import JSONDeserializer
  from sagemaker.deprecations import removed_kwargs
  from sagemaker.drift_check_baselines import DriftCheckBaselines
  from sagemaker.metadata_properties import MetadataProperties
  from sagemaker.predictor import Predictor
  from sagemaker.serializers import JSONSerializer
  from sagemaker.workflow import is_pipeline_variable
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.workflow.pipeline_context import PipelineSession
  from sagemaker.utils import format_tags
label_desc: Use image node_id 1 to create a new TensorFlowPredictor object from inherited base classes: Predictor with example: obj = TensorFlowPredictor(endpoint_name, sagemaker_session, serializer, deserializer, model_name, model_version, component_name)