class_docstr: A RealTimePredictor for inference against GluonTS Endpoints.
  
  This is able to serialize and deserialize datasets in the gluonts data
  format.
docstr: Initialize an ``GluonTSPredictor``.
  
  Parameters
  ----------
  endpoint_name:
      The name of the endpoint to perform inference on.
  sagemaker_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.
docstr_tok: ["Initialize","an","``","GluonTSPredictor","``",".","Parameters","--","--","--","--","--","endpoint_name",":","The","name","of","the","endpoint","to","perform","inference","on",".","sagemaker_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","."]
code: def __init__(
      self,
      endpoint_name: str,
      sagemaker_session: session.Session = None,
  ):
      """
      Initialize an ``GluonTSPredictor``.
  
      Parameters
      ----------
      endpoint_name:
          The name of the endpoint to perform inference on.
      sagemaker_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.
      """
  
      # TODO: implement custom data serializer and deserializer: convert between gluonts dataset and bytes
      # Use the default functions from MXNet (they handle more than we need
      # (e.g: np.ndarrays), but that should be fine)
      super().__init__(
          endpoint_name,
          sagemaker_session,
          json_serializer,  # change this
          json_deserializer,  # change this
      )
  
file_path: gluonts/src/gluonts/nursery/sagemaker_sdk/model.py
imports: import logging
  from typing import Dict
  import sagemaker
  from pkg_resources import parse_version
  from sagemaker import session
  from sagemaker.fw_utils import model_code_key_prefix
  from sagemaker.model import MODEL_SERVER_WORKERS_PARAM_NAME, FrameworkModel
  from sagemaker.predictor import RealTimePredictor, json_deserializer, json_serializer
  from .defaults import FRAMEWORK_NAME, GLUONTS_VERSION, LOWEST_MMS_VERSION
label_desc: Use image node_id 1 to create a new GluonTSPredictor object from inherited base classes: RealTimePredictor with example: obj = GluonTSPredictor(endpoint_name, sagemaker_session)