class_docstr: A Predictor for inference against Hugging Face Endpoints.
  
  This is able to serialize Python lists, dictionaries, and numpy arrays to
  multidimensional tensors for Hugging Face inference.
class_docstr_tok: ["A","Predictor","for","inference","against","Hugging","Face","Endpoints",".","This","is","able","to","serialize","Python","lists",",","dictionaries",",","and","numpy","arrays","to","multidimensional","tensors","for","Hugging","Face","inference","."]
docstr: Initialize an ``HuggingFacePredictor``.
  
  Args:
      endpoint_name (str): The name of the endpoint to perform inference
          on.
      sagemaker_session (sagemaker.session.Session): Session object that
          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 (sagemaker.serializers.BaseSerializer): Optional. Default
          serializes input data to .npy format. Handles lists and numpy
          arrays.
      deserializer (sagemaker.deserializers.BaseDeserializer): Optional.
          Default parses the response from .npy format to numpy array.
      component_name (str): Optional. Name of the Amazon SageMaker inference
          component corresponding to the predictor.
docstr_tok: ["Initialize","an","``","HuggingFacePredictor","``",".","Args",":","endpoint_name","(","str",")",":","The","name","of","the","endpoint","to","perform","inference","on",".","sagemaker_session","(","sagemaker.session.Session",")",":","Session","object","that","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","(","sagemaker.serializers.BaseSerializer",")",":","Optional",".","Default","serializes","input","data","to",".npy","format",".","Handles","lists","and","numpy","arrays",".","deserializer","(","sagemaker.deserializers.BaseDeserializer",")",":","Optional",".","Default","parses","the","response","from",".npy","format","to","numpy","array",".","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(),
      component_name=None,
  ):
      """Initialize an ``HuggingFacePredictor``.
  
      Args:
          endpoint_name (str): The name of the endpoint to perform inference
              on.
          sagemaker_session (sagemaker.session.Session): Session object that
              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 (sagemaker.serializers.BaseSerializer): Optional. Default
              serializes input data to .npy format. Handles lists and numpy
              arrays.
          deserializer (sagemaker.deserializers.BaseDeserializer): Optional.
              Default parses the response from .npy format to numpy array.
          component_name (str): Optional. Name of the Amazon SageMaker inference
              component corresponding to the predictor.
      """
      super(HuggingFacePredictor, self).__init__(
          endpoint_name,
          sagemaker_session,
          serializer=serializer,
          deserializer=deserializer,
          component_name=component_name,
      )
  
imports: from __future__ import absolute_import
  import logging
  from typing import Optional, Union, List, Dict
  import sagemaker
  from sagemaker import image_uris, ModelMetrics
  from sagemaker.deserializers import JSONDeserializer
  from sagemaker.drift_check_baselines import DriftCheckBaselines
  from sagemaker.fw_utils import model_code_key_prefix, validate_version_or_image_args
  from sagemaker.metadata_properties import MetadataProperties
  from sagemaker.model import FrameworkModel, MODEL_SERVER_WORKERS_PARAM_NAME
  from sagemaker.predictor import Predictor
  from sagemaker.serializers import JSONSerializer
  from sagemaker.session import Session
  from sagemaker.utils import to_string, format_tags
  from sagemaker.workflow import is_pipeline_variable
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 1 to create a new HuggingFacePredictor object from inherited base classes: Predictor with example: obj = HuggingFacePredictor(endpoint_name, sagemaker_session, serializer, deserializer, component_name)