class_docstr: An MXNet SageMaker ``Model`` that can be deployed to a SageMaker ``Endpoint``.
class_docstr_tok: ["An","MXNet","SageMaker","``","Model","``","that","can","be","deployed","to","a","SageMaker","``","Endpoint","``","."]
docstr: Initialize an MXNetModel.
  
  Args:
      model_data (str or PipelineVariable): The S3 location of a SageMaker model data
          ``.tar.gz`` file.
      role (str): An AWS IAM role (either name or full ARN). The Amazon
          SageMaker training jobs and APIs that create Amazon SageMaker
          endpoints use this role to access training data and model
          artifacts. After the endpoint is created, the inference code
          might use the IAM role, if it needs to access an AWS resource.
      entry_point (str): Path (absolute or relative) to the Python source
          file which should be executed as the entry point to model
          hosting. If ``source_dir`` is specified, then ``entry_point``
          must point to a file located at the root of ``source_dir``.
      framework_version (str): MXNet version you want to use for executing
          your model training code. Defaults to ``1.4.0``. Required unless
          ``image_uri`` is provided.
      py_version (str): Python version you want to use for executing your
          model training code. Defaults to ``None``. Required unless
          ``image_uri`` is provided.
      image_uri (str or PipelineVariable): A Docker image URI (default: None).
          If not specified, a default image for MXNet will be used.
          If ``framework_version`` or ``py_version`` are ``None``, then
          ``image_uri`` is required. If ``image_uri`` is also ``None``, then a ``ValueError``
          will be raised.
      predictor_cls (callable[str, sagemaker.session.Session]): A function
          to call to create a predictor with an endpoint name and
          SageMaker ``Session``. If specified, ``deploy()`` returns the
          result of invoking this function on the created endpoint name.
      model_server_workers (int or PipelineVariable): Optional. The number of worker processes
          used by the inference server. If None, server will use one
          worker per vCPU.
      **kwargs: Keyword arguments passed to the superclass
          :class:`~sagemaker.model.FrameworkModel` and, subsequently, its
          superclass :class:`~sagemaker.model.Model`.
  
  .. tip::
  
      You can find additional parameters for initializing this class at
      :class:`~sagemaker.model.FrameworkModel` and
      :class:`~sagemaker.model.Model`.
docstr_tok: ["Initialize","an","MXNetModel",".","Args",":","model_data","(","str","or","PipelineVariable",")",":","The","S3","location","of","a","SageMaker","model","data","``",".tar.gz","``","file",".","role","(","str",")",":","An","AWS","IAM","role","(","either","name","or","full","ARN",")",".","The","Amazon","SageMaker","training","jobs","and","APIs","that","create","Amazon","SageMaker","endpoints","use","this","role","to","access","training","data","and","model","artifacts",".","After","the","endpoint","is","created",",","the","inference","code","might","use","the","IAM","role",",","if","it","needs","to","access","an","AWS","resource",".","entry_point","(","str",")",":","Path","(","absolute","or","relative",")","to","the","Python","source","file","which","should","be","executed","as","the","entry","point","to","model","hosting",".","If","``","source_dir","``","is","specified",",","then","``","entry_point","``","must","point","to","a","file","located","at","the","root","of","``","source_dir","``",".","framework_version","(","str",")",":","MXNet","version","you","want","to","use","for","executing","your","model","training","code",".","Defaults","to","``","1.4.0","``",".","Required","unless","``","image_uri","``","is","provided",".","py_version","(","str",")",":","Python","version","you","want","to","use","for","executing","your","model","training","code",".","Defaults","to","``","None","``",".","Required","unless","``","image_uri","``","is","provided",".","image_uri","(","str","or","PipelineVariable",")",":","A","Docker","image","URI","(","default",":","None",")",".","If","not","specified",",","a","default","image","for","MXNet","will","be","used",".","If","``","framework_version","``","or","``","py_version","``","are","``","None","``",",","then","``","image_uri","``","is","required",".","If","``","image_uri","``","is","also","``","None","``",",","then","a","``","ValueError","``","will","be","raised",".","predictor_cls","(","callable","[","str",",","sagemaker.session.Session","]",")",":","A","function","to","call","to","create","a","predictor","with","an","endpoint","name","and","SageMaker","``","Session","``",".","If","specified",",","``","deploy","(",")","``","returns","the","result","of","invoking","this","function","on","the","created","endpoint","name",".","model_server_workers","(","int","or","PipelineVariable",")",":","Optional",".","The","number","of","worker","processes","used","by","the","inference","server",".","If","None",",","server","will","use","one","worker","per","vCPU",".","*","*","kwargs",":","Keyword","arguments","passed","to","the","superclass",":","class",":","`","~sagemaker.model.FrameworkModel","`","and",",","subsequently",",","its","superclass",":","class",":","`","~sagemaker.model.Model","`",".","..","tip",":",":","You","can","find","additional","parameters","for","initializing","this","class","at",":","class",":","`","~sagemaker.model.FrameworkModel","`","and",":","class",":","`","~sagemaker.model.Model","`","."]
code: def __init__(
      self,
      model_data: Union[str, PipelineVariable],
      role: Optional[str] = None,
      entry_point: Optional[str] = None,
      framework_version: str = _LOWEST_MMS_VERSION,
      py_version: Optional[str] = None,
      image_uri: Optional[Union[str, PipelineVariable]] = None,
      predictor_cls: callable = MXNetPredictor,
      model_server_workers: Optional[
          Union[int, PipelineVariable]
      ] = None,
      **kwargs,
  ):
      """Initialize an MXNetModel.
  
      Args:
          model_data (str or PipelineVariable): The S3 location of a SageMaker model data
              ``.tar.gz`` file.
          role (str): An AWS IAM role (either name or full ARN). The Amazon
              SageMaker training jobs and APIs that create Amazon SageMaker
              endpoints use this role to access training data and model
              artifacts. After the endpoint is created, the inference code
              might use the IAM role, if it needs to access an AWS resource.
          entry_point (str): Path (absolute or relative) to the Python source
              file which should be executed as the entry point to model
              hosting. If ``source_dir`` is specified, then ``entry_point``
              must point to a file located at the root of ``source_dir``.
          framework_version (str): MXNet version you want to use for executing
              your model training code. Defaults to ``1.4.0``. Required unless
              ``image_uri`` is provided.
          py_version (str): Python version you want to use for executing your
              model training code. Defaults to ``None``. Required unless
              ``image_uri`` is provided.
          image_uri (str or PipelineVariable): A Docker image URI (default: None).
              If not specified, a default image for MXNet will be used.
              If ``framework_version`` or ``py_version`` are ``None``, then
              ``image_uri`` is required. If ``image_uri`` is also ``None``, then a ``ValueError``
              will be raised.
          predictor_cls (callable[str, sagemaker.session.Session]): A function
              to call to create a predictor with an endpoint name and
              SageMaker ``Session``. If specified, ``deploy()`` returns the
              result of invoking this function on the created endpoint name.
          model_server_workers (int or PipelineVariable): Optional. The number of worker processes
              used by the inference server. If None, server will use one
              worker per vCPU.
          **kwargs: Keyword arguments passed to the superclass
              :class:`~sagemaker.model.FrameworkModel` and, subsequently, its
              superclass :class:`~sagemaker.model.Model`.
  
      .. tip::
  
          You can find additional parameters for initializing this class at
          :class:`~sagemaker.model.FrameworkModel` and
          :class:`~sagemaker.model.Model`.
      """
      validate_version_or_image_args(
          framework_version, py_version, image_uri
      )
      if py_version == "py2":
          logger.warning(
              python_deprecation_warning(
                  self._framework_name, defaults.LATEST_PY2_VERSION
              )
          )
      self.framework_version = framework_version
      self.py_version = py_version
  
      super(MXNetModel, self).__init__(
          model_data,
          image_uri,
          role,
          entry_point,
          predictor_cls=predictor_cls,
          **kwargs,
      )
      self.model_server_workers = model_server_workers
  
imports: from __future__ import absolute_import
  import logging
  from typing import Union, Optional, List, Dict
  import packaging.version
  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, python_deprecation_warning, validate_version_or_image_args
  from sagemaker.metadata_properties import MetadataProperties
  from sagemaker.model import FrameworkModel, MODEL_SERVER_WORKERS_PARAM_NAME
  from sagemaker.mxnet import defaults
  from sagemaker.predictor import Predictor
  from sagemaker.serializers import JSONSerializer
  from sagemaker.utils import to_string
  from sagemaker.workflow import is_pipeline_variable
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 1 to create a new MXNetModel object from inherited base classes: FrameworkModel with example: obj = MXNetModel(model_data, role, entry_point, framework_version, py_version, image_uri, predictor_cls, model_server_workers)