class_docstr: Holds the required method to deploy a model to a SageMaker Endpoint
class_docstr_tok: ["Holds","the","required","method","to","deploy","a","model","to","a","SageMaker","Endpoint"]
docstr: Placeholder docstring
docstr_tok: ["Placeholder","docstring"]
code: def load(self, model_path: str):
      """Placeholder docstring"""
      path = Path(model_path)
      if not path.exists():
          raise Exception("model_path does not exist")
      if not path.is_dir():
          raise Exception("model_path is not a valid directory")
  
      model_dir = path.joinpath("model")
      return self.inference_spec.model_fn(str(model_dir))
  
file_path: sagemaker-python-sdk/src/sagemaker/serve/mode/sagemaker_endpoint_mode.py
imports: from __future__ import absolute_import
  from pathlib import Path
  import logging
  from typing import Type
  from sagemaker.session import Session
  from sagemaker.serve.utils.types import ModelServer
  from sagemaker.serve.spec.inference_spec import InferenceSpec
  from sagemaker.serve.model_server.triton.server import SageMakerTritonServer
  from sagemaker.serve.model_server.torchserve.server import SageMakerTorchServe
  from sagemaker.serve.model_server.djl_serving.server import SageMakerDjlServing
  from sagemaker.serve.model_server.tgi.server import SageMakerTgiServing
label_desc: Use image node_id 2 for calling the SageMakerEndpointMode obj's underlying member method code with example usage: obj.load(model_path) and returns: self