class_docstr: An XGBoost SageMaker ``Model`` that can be deployed to a SageMaker ``Endpoint``.
class_docstr_tok: ["An","XGBoost","SageMaker","``","Model","``","that","can","be","deployed","to","a","SageMaker","``","Endpoint","``","."]
docstr: Initialize an XGBoostModel.
  
  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``.
      image_uri (str or PipelineVariable): A Docker image URI (default: None).
          If not specified, a default image for XGBoost is be used.
      py_version (str): Python version you want to use for executing your model training code
          (default: 'py3').
      framework_version (str): XGBoost version you want to use for executing your model
          training code.
      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","XGBoostModel",".","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","``",".","image_uri","(","str","or","PipelineVariable",")",":","A","Docker","image","URI","(","default",":","None",")",".","If","not","specified",",","a","default","image","for","XGBoost","is","be","used",".","py_version","(","str",")",":","Python","version","you","want","to","use","for","executing","your","model","training","code","(","default",":","'py3","'",")",".","framework_version","(","str",")",":","XGBoost","version","you","want","to","use","for","executing","your","model","training","code",".","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: str = None,
      entry_point: str = None,
      framework_version: str = None,
      image_uri: Optional[Union[str, PipelineVariable]] = None,
      py_version: str = "py3",
      predictor_cls: callable = XGBoostPredictor,
      model_server_workers: Optional[
          Union[int, PipelineVariable]
      ] = None,
      **kwargs,
  ):
      """Initialize an XGBoostModel.
  
      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``.
          image_uri (str or PipelineVariable): A Docker image URI (default: None).
              If not specified, a default image for XGBoost is be used.
          py_version (str): Python version you want to use for executing your model training code
              (default: 'py3').
          framework_version (str): XGBoost version you want to use for executing your model
              training code.
          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`.
      """
      super(XGBoostModel, self).__init__(
          model_data,
          image_uri,
          role,
          entry_point,
          predictor_cls=predictor_cls,
          **kwargs,
      )
  
      self.py_version = py_version
      self.framework_version = framework_version
      self.model_server_workers = model_server_workers
  
      validate_py_version(py_version)
      validate_framework_version(framework_version)
  
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 CSVDeserializer
  from sagemaker.drift_check_baselines import DriftCheckBaselines
  from sagemaker.fw_utils import model_code_key_prefix
  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 LibSVMSerializer
  from sagemaker.utils import to_string
  from sagemaker.workflow import is_pipeline_variable
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.xgboost.defaults import XGBOOST_NAME
  from sagemaker.xgboost.utils import validate_py_version, validate_framework_version
label_desc: Use image node_id 1 to create a new XGBoostModel object from inherited base classes: FrameworkModel with example: obj = XGBoostModel(model_data, role, entry_point, framework_version, image_uri, py_version, predictor_cls, model_server_workers)