class_docstr: ModelSignature specifies schema of model's inputs, outputs and params.
  
  ModelSignature can be :py:func:`inferred <mlflow.models.infer_signature>` from training
  dataset, model predictions using and params for inference, or constructed by hand by
  passing an input and output :py:class:`Schema <mlflow.types.Schema>`, and params
  :py:class:`ParamSchema <mlflow.types.ParamSchema>`.
docstr: Serialize into a 'jsonable' dictionary.
  
  Input and output schema are represented as json strings. This is so that the
  representation is compact when embedded in an MLmodel yaml file.
  
  :return: dictionary representation with input and output schema represented as json strings.
docstr_tok: ["Serialize","into","a","'jsonable","'","dictionary",".","Input","and","output","schema","are","represented","as","json","strings",".","This","is","so","that","the","representation","is","compact","when","embedded","in","an","MLmodel","yaml","file",".",":","return",":","dictionary","representation","with","input","and","output","schema","represented","as","json","strings","."]
code: def to_dict(self) -> Dict[str, Any]:
      """
      Serialize into a 'jsonable' dictionary.
  
      Input and output schema are represented as json strings. This is so that the
      representation is compact when embedded in an MLmodel yaml file.
  
      :return: dictionary representation with input and output schema represented as json strings.
      """
  
      return {
          "inputs": self.inputs.to_json() if self.inputs else None,
          "outputs": self.outputs.to_json() if self.outputs else None,
          "params": self.params.to_json() if self.params else None,
      }
  
imports: import inspect
  import logging
  import re
  from copy import deepcopy
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union, get_type_hints
  import numpy
  import pandas
  from mlflow import environment_variables
  from mlflow.exceptions import MlflowException
  from mlflow.models import Model
  from mlflow.models.model import MLMODEL_FILE_NAME
  from mlflow.models.utils import ModelInputExample, _contains_params, _Example
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE, RESOURCE_DOES_NOT_EXIST
  from mlflow.store.artifact.models_artifact_repo import ModelsArtifactRepository
  from mlflow.store.artifact.runs_artifact_repo import RunsArtifactRepository
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri, _upload_artifact_to_uri
  from mlflow.types.schema import ParamSchema, Schema
  from mlflow.types.utils import _infer_param_schema, _infer_schema, _infer_schema_from_type_hint
  from mlflow.utils.uri import append_to_uri_path
label_desc: Use image node_id 2 for calling the ModelSignature obj's underlying member method code with example usage: obj.to_dict() and returns: dict