class_docstr: Model data and S3 location holder for MLeap serialized SparkML model.
  
  Calling :meth:`~sagemaker.model.Model.deploy` creates an Endpoint and return
  a Predictor to performs predictions against an MLeap serialized SparkML
  model .
class_docstr_tok: ["Model","data","and","S3","location","holder","for","MLeap","serialized","SparkML","model",".","Calling",":","meth",":","`","~sagemaker.model.Model.deploy","`","creates","an","Endpoint","and","return","a","Predictor","to","performs","predictions","against","an","MLeap","serialized","SparkML","model","."]
docstr: Initialize a SparkMLModel.
  
  Args:
      model_data (str or PipelineVariable): The S3 location of a SageMaker model data
          ``.tar.gz`` file. For SparkML, this will be the output that has
          been produced by the Spark job after serializing the Model via
          MLeap.
      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.
      spark_version (str): Spark version you want to use for executing the
          inference (default: '3.3').
      sagemaker_session (sagemaker.session.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. For local mode,
          please do not pass this variable.
      **kwargs: Additional parameters passed to the
          :class:`~sagemaker.model.Model` constructor.
  
  .. tip::
  
      You can find additional parameters for initializing this class at
      :class:`~sagemaker.model.Model`.
docstr_tok: ["Initialize","a","SparkMLModel",".","Args",":","model_data","(","str","or","PipelineVariable",")",":","The","S3","location","of","a","SageMaker","model","data","``",".tar.gz","``","file",".","For","SparkML",",","this","will","be","the","output","that","has","been","produced","by","the","Spark","job","after","serializing","the","Model","via","MLeap",".","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",".","spark_version","(","str",")",":","Spark","version","you","want","to","use","for","executing","the","inference","(","default",":","'","3.3","'",")",".","sagemaker_session","(","sagemaker.session.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",".","For","local","mode",",","please","do","not","pass","this","variable",".","*","*","kwargs",":","Additional","parameters","passed","to","the",":","class",":","`","~sagemaker.model.Model","`","constructor",".","..","tip",":",":","You","can","find","additional","parameters","for","initializing","this","class","at",":","class",":","`","~sagemaker.model.Model","`","."]
code: def __init__(
      self,
      model_data: Union[str, PipelineVariable],
      role: Optional[str] = None,
      spark_version: str = "3.3",
      sagemaker_session: Optional[Session] = None,
      **kwargs,
  ):
      """Initialize a SparkMLModel.
  
      Args:
          model_data (str or PipelineVariable): The S3 location of a SageMaker model data
              ``.tar.gz`` file. For SparkML, this will be the output that has
              been produced by the Spark job after serializing the Model via
              MLeap.
          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.
          spark_version (str): Spark version you want to use for executing the
              inference (default: '3.3').
          sagemaker_session (sagemaker.session.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. For local mode,
              please do not pass this variable.
          **kwargs: Additional parameters passed to the
              :class:`~sagemaker.model.Model` constructor.
  
      .. tip::
  
          You can find additional parameters for initializing this class at
          :class:`~sagemaker.model.Model`.
      """
      # For local mode, sagemaker_session should be passed as None but we need a session to get
      # boto_region_name
      region_name = (sagemaker_session or Session()).boto_region_name
      image_uri = image_uris.retrieve(
          framework_name, region_name, version=spark_version
      )
      pop_out_unused_kwarg(
          "predictor_cls", kwargs, SparkMLPredictor.__name__
      )
      pop_out_unused_kwarg("image_uri", kwargs, image_uri)
      super(SparkMLModel, self).__init__(
          image_uri,
          model_data,
          role,
          predictor_cls=SparkMLPredictor,
          sagemaker_session=sagemaker_session,
          **kwargs,
      )
  
file_path: sagemaker-python-sdk/src/sagemaker/sparkml/model.py
imports: from __future__ import absolute_import
  from typing import Union, Optional
  from sagemaker import Model, Predictor, Session, image_uris
  from sagemaker.serializers import CSVSerializer
  from sagemaker.utils import pop_out_unused_kwarg
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 1 to create a new SparkMLModel object from inherited base classes: Model with example: obj = SparkMLModel(model_data, role, spark_version, sagemaker_session)