class_docstr: An MLflow Model that can support multiple model flavors. Provides APIs for implementing
  new Model flavors.
class_docstr_tok: ["An","MLflow","Model","that","can","support","multiple","model","flavors",".","Provides","APIs","for","implementing","new","Model","flavors","."]
docstr: Load a model from its YAML representation.
  
  :param path: A local filesystem path or URI referring to the MLmodel YAML file
               representation of the :py:class:`Model` object or to the directory containing
               the MLmodel YAML file representation.
  :return: An instance of :py:class:`Model`.
  
  
  .. code-block:: python
      :caption: example
  
      from mlflow.models import Model
  
      # Load the Model object from a local MLmodel file
      model1 = Model.load("~/path/to/my/MLmodel")
  
      # Load the Model object from a remote model directory
      model2 = Model.load("s3://mybucket/path/to/my/model")
docstr_tok: ["Load","a","model","from","its","YAML","representation",".",":","param","path",":","A","local","filesystem","path","or","URI","referring","to","the","MLmodel","YAML","file","representation","of","the",":","py",":","class",":","`","Model","`","object","or","to","the","directory","containing","the","MLmodel","YAML","file","representation",".",":","return",":","An","instance","of",":","py",":","class",":","`","Model","`",".","..","code-block",":",":","python",":","caption",":","example","from","mlflow.models","import","Model","#","Load","the","Model","object","from","a","local","MLmodel","file","model1","=","Model.load","(","``","~\/path\/to\/my\/MLmodel","''",")","#","Load","the","Model","object","from","a","remote","model","directory","model2","=","Model.load","(","``","s3",":","\/\/mybucket\/path\/to\/my\/model","''",")"]
code: def load(cls, path):
      """
      Load a model from its YAML representation.
  
      :param path: A local filesystem path or URI referring to the MLmodel YAML file
                   representation of the :py:class:`Model` object or to the directory containing
                   the MLmodel YAML file representation.
      :return: An instance of :py:class:`Model`.
  
  
      .. code-block:: python
          :caption: example
  
          from mlflow.models import Model
  
          # Load the Model object from a local MLmodel file
          model1 = Model.load("~/path/to/my/MLmodel")
  
          # Load the Model object from a remote model directory
          model2 = Model.load("s3://mybucket/path/to/my/model")
      """
      path = download_artifacts(artifact_uri=path)
      if os.path.isdir(path):
          path = os.path.join(path, MLMODEL_FILE_NAME)
      with open(path) as f:
          return cls.from_dict(yaml.safe_load(f.read()))
  
imports: import json
  import logging
  import os
  import uuid
  import warnings
  from datetime import datetime
  from typing import Any, Callable, Dict, Optional, Union
  import yaml
  import mlflow
  from mlflow.artifacts import download_artifacts
  from mlflow.exceptions import MlflowException
  from mlflow.tracking._model_registry import DEFAULT_AWAIT_MAX_SLEEP_SECONDS
  from mlflow.tracking._tracking_service.utils import _resolve_tracking_uri
  from mlflow.utils.annotations import experimental
  from mlflow.utils.databricks_utils import get_databricks_runtime
  from mlflow.utils.file_utils import TempDir
  from mlflow.utils.uri import get_uri_scheme
label_desc: Use image node_id 23 for calling the Model obj's underlying member method code with example usage: obj.load(cls, path) and returns: cls