class_docstr: Make prediction requests to an Amazon SageMaker endpoint.
class_docstr_tok: ["Make","prediction","requests","to","an","Amazon","SageMaker","endpoint","."]
docstr: Initialize a ``Predictor``.
  
  Behavior for serialization of input data and deserialization of
  result data can be configured through initializer arguments. If not
  specified, a sequence of bytes is expected and the API sends it in the
  request body without modifications. In response, the API returns the
  sequence of bytes from the prediction result without any modifications.
  
  Args:
      endpoint_name (str): Name of the Amazon SageMaker endpoint to which
          requests are sent.
      sagemaker_session (sagemaker.session.Session): A SageMaker Session
          object, used for SageMaker interactions (default: None). If not
          specified, one is created using the default AWS configuration
          chain.
      serializer (:class:`~sagemaker.serializers.BaseSerializer`): A
          serializer object, used to encode data for an inference endpoint
          (default: :class:`~sagemaker.serializers.IdentitySerializer`).
      deserializer (:class:`~sagemaker.deserializers.BaseDeserializer`): A
          deserializer object, used to decode data from an inference
          endpoint (default: :class:`~sagemaker.deserializers.BytesDeserializer`).
      component_name (str): Name of the Amazon SageMaker inference component
          corresponding the predictor.
docstr_tok: ["Initialize","a","``","Predictor","``",".","Behavior","for","serialization","of","input","data","and","deserialization","of","result","data","can","be","configured","through","initializer","arguments",".","If","not","specified",",","a","sequence","of","bytes","is","expected","and","the","API","sends","it","in","the","request","body","without","modifications",".","In","response",",","the","API","returns","the","sequence","of","bytes","from","the","prediction","result","without","any","modifications",".","Args",":","endpoint_name","(","str",")",":","Name","of","the","Amazon","SageMaker","endpoint","to","which","requests","are","sent",".","sagemaker_session","(","sagemaker.session.Session",")",":","A","SageMaker","Session","object",",","used","for","SageMaker","interactions","(","default",":","None",")",".","If","not","specified",",","one","is","created","using","the","default","AWS","configuration","chain",".","serializer","(",":","class",":","`","~sagemaker.serializers.BaseSerializer","`",")",":","A","serializer","object",",","used","to","encode","data","for","an","inference","endpoint","(","default",":",":","class",":","`","~sagemaker.serializers.IdentitySerializer","`",")",".","deserializer","(",":","class",":","`","~sagemaker.deserializers.BaseDeserializer","`",")",":","A","deserializer","object",",","used","to","decode","data","from","an","inference","endpoint","(","default",":",":","class",":","`","~sagemaker.deserializers.BytesDeserializer","`",")",".","component_name","(","str",")",":","Name","of","the","Amazon","SageMaker","inference","component","corresponding","the","predictor","."]
code: def __init__(
      self,
      endpoint_name,
      sagemaker_session=None,
      serializer=IdentitySerializer(),
      deserializer=BytesDeserializer(),
      component_name=None,
      **kwargs,
  ):
      """Initialize a ``Predictor``.
  
      Behavior for serialization of input data and deserialization of
      result data can be configured through initializer arguments. If not
      specified, a sequence of bytes is expected and the API sends it in the
      request body without modifications. In response, the API returns the
      sequence of bytes from the prediction result without any modifications.
  
      Args:
          endpoint_name (str): Name of the Amazon SageMaker endpoint to which
              requests are sent.
          sagemaker_session (sagemaker.session.Session): A SageMaker Session
              object, used for SageMaker interactions (default: None). If not
              specified, one is created using the default AWS configuration
              chain.
          serializer (:class:`~sagemaker.serializers.BaseSerializer`): A
              serializer object, used to encode data for an inference endpoint
              (default: :class:`~sagemaker.serializers.IdentitySerializer`).
          deserializer (:class:`~sagemaker.deserializers.BaseDeserializer`): A
              deserializer object, used to decode data from an inference
              endpoint (default: :class:`~sagemaker.deserializers.BytesDeserializer`).
          component_name (str): Name of the Amazon SageMaker inference component
              corresponding the predictor.
      """
      removed_kwargs("content_type", kwargs)
      removed_kwargs("accept", kwargs)
      endpoint_name = renamed_kwargs(
          "endpoint", "endpoint_name", endpoint_name, kwargs
      )
      self.endpoint_name = endpoint_name
      self.component_name = component_name
      self.sagemaker_session = sagemaker_session or Session()
      self.serializer = serializer
      self.deserializer = deserializer
      self._endpoint_config_name = None
      self._model_names = None
      self._context = None
      self._content_type = None
      self._accept = None
  
imports: from __future__ import print_function, absolute_import
  import abc
  import datetime
  from typing import Any, Dict, Optional, Tuple, Union
  import logging
  from sagemaker.enums import EndpointType
  from sagemaker.deprecations import deprecated_class, deprecated_deserialize, deprecated_serialize, removed_kwargs, renamed_kwargs, renamed_warning
  from sagemaker.deserializers import BytesDeserializer, CSVDeserializer, JSONDeserializer, NumpyDeserializer, StreamDeserializer, StringDeserializer
  from sagemaker.jumpstart.payload_utils import PayloadSerializer
  from sagemaker.jumpstart.types import JumpStartSerializablePayload
  from sagemaker.jumpstart.utils import get_jumpstart_content_bucket
  from sagemaker.model_monitor import DataCaptureConfig, DefaultModelMonitor, ModelBiasMonitor, ModelExplainabilityMonitor, ModelMonitor, ModelQualityMonitor
  from sagemaker.serializers import CSVSerializer, IdentitySerializer, JSONSerializer, NumpySerializer
  from sagemaker.session import production_variant, Session
  from sagemaker.utils import name_from_base, stringify_object, format_tags
  from sagemaker.model_monitor.model_monitoring import DEFAULT_REPOSITORY_NAME
  from sagemaker.lineage.context import EndpointContext
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
label_desc: Use image node_id 1 to create a new Predictor object from inherited base classes: PredictorBase with example: obj = Predictor(endpoint_name, sagemaker_session, serializer, deserializer, component_name)