class_docstr: Make async prediction requests to an Amazon SageMaker endpoint.
class_docstr_tok: ["Make","async","prediction","requests","to","an","Amazon","SageMaker","endpoint","."]
docstr: Initialize an ``AsyncPredictor``.
  
  Args:
      predictor (sagemaker.predictor.Predictor): General ``Predictor``
          object has useful methods and variables. ``AsyncPredictor``
          stands on top of it with capability for async inference.
docstr_tok: ["Initialize","an","``","AsyncPredictor","``",".","Args",":","predictor","(","sagemaker.predictor.Predictor",")",":","General","``","Predictor","``","object","has","useful","methods","and","variables",".","``","AsyncPredictor","``","stands","on","top","of","it","with","capability","for","async","inference","."]
code: def __init__(
      self,
      predictor,
      name=None,
  ):
      """Initialize an ``AsyncPredictor``.
  
      Args:
          predictor (sagemaker.predictor.Predictor): General ``Predictor``
              object has useful methods and variables. ``AsyncPredictor``
              stands on top of it with capability for async inference.
      """
      self.predictor = predictor
      self.endpoint_name = predictor.endpoint_name
      self.sagemaker_session = predictor.sagemaker_session or Session()
      if self.sagemaker_session.s3_client is None:
          self.s3_client = self.sagemaker_session.boto_session.client(
              "s3",
              region_name=self.sagemaker_session.boto_region_name,
          )
      else:
          self.s3_client = self.sagemaker_session.s3_client
  
      self.serializer = predictor.serializer
      self.deserializer = predictor.deserializer
      self.name = name
      self._endpoint_config_name = None
      self._model_names = None
      self._context = None
      self._input_path = None
  
imports: from __future__ import absolute_import
  import threading
  import time
  import uuid
  from botocore.exceptions import WaiterError
  from sagemaker import s3
  from sagemaker.exceptions import PollingTimeoutError, AsyncInferenceModelError
  from sagemaker.async_inference import WaiterConfig, AsyncInferenceResponse
  from sagemaker.s3 import parse_s3_url
  from sagemaker.session import Session
  from sagemaker.utils import name_from_base, sagemaker_timestamp, format_tags
label_desc: Use image node_id 1 to create a new AsyncPredictor object  with example: obj = AsyncPredictor(predictor, name)