class_docstr: Experimental
docstr: Now we are using Pickle to save the model, we need to convert it to torchscript
docstr_tok: ["Now","we","are","using","Pickle","to","save","the","model",",","we","need","to","convert","it","to","torchscript"]
code: def save_model(self) -> None:
      """Now we are using Pickle to save the model, we need to convert it to torchscript"""
      logging.info("Saving xgboost model...")
      if self.model:
          self.model_format = "xgb"
          path = Path(f"{self.model_path}.{self.model_format}")
          self.model.save_model(path.resolve().as_posix())
  
      self.schema_path, self.schema_format = capture_schema(
          self.schema_path, self.schema_format, self.schema
      )
  
      if self.inference_spec:
          path = Path(
              f"{self.inference_spec_path}.{self.inference_spec_format}"
          )
          save_pkl(path, self.inference_spec)
  
      self._xgboost_generate_hmac()
      logging.info("XGBoost model saved successfully")
  
imports: from __future__ import absolute_import
  import platform
  import logging
  from pathlib import Path
  from typing import Type
  from sagemaker.serve.save_retrive.version_1_0_0.save.utils import generate_secret_key, compute_hash, save_pkl, save_yaml, capture_schema, get_image_url
  from sagemaker import Session
  from sagemaker.predictor import Predictor
  from sagemaker.serve.save_retrive.version_1_0_0.metadata.metadata import XGBoostMetadata
  from sagemaker.model import Model
  from sagemaker.serve.save_retrive.version_1_0_0.save.framework.framework_handler import FrameworkHandler
  from sagemaker.serve.builder.schema_builder import SchemaBuilder
  from sagemaker.serve.spec.inference_spec import InferenceSpec
label_desc: Use image node_id 3 for calling the XGBoostHandler obj's underlying member method code with example usage: obj.save_model() without return types