class_docstr: Represents the schema of a dataset with tensor features and targets.
docstr: Serialize into a 'jsonable' dictionary.
  
  Returns:
      dictionary representation of the schema's features and targets (if defined).
docstr_tok: ["Serialize","into","a","'jsonable","'","dictionary",".","Returns",":","dictionary","representation","of","the","schema","'s","features","and","targets","(","if","defined",")","."]
code: def to_dict(self) -> Dict[str, Any]:
      """Serialize into a 'jsonable' dictionary.
  
      Returns:
          dictionary representation of the schema's features and targets (if defined).
  
      """
  
      return {
          "mlflow_tensorspec": {
              "features": self.features.to_json(),
              "targets": self.targets.to_json()
              if self.targets is not None
              else None,
          },
      }
  
file_path: mlflow/mlflow/data/schema.py
imports: from typing import Any, Dict
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
  from mlflow.types.schema import Schema
label_desc: Use image node_id 2 for calling the TensorDatasetSchema obj's underlying member method code with example usage: obj.to_dict() and returns: dict