class_docstr: Represents a TensorFlow dataset for use with MLflow Tracking.
class_docstr_tok: ["Represents","a","TensorFlow","dataset","for","use","with","MLflow","Tracking","."]
code: def _get_schema_from_tf_dataset_tuple_numpy_data(
      numpy_data: Tuple[Any],
  ) -> Schema:
      if not all(
          isinstance(data_element, np.ndarray)
          for data_element in numpy_data
      ):
          raise MlflowException(
              "Failed to infer schema for tf.data.Dataset. Schemas can only be inferred"
              " if the dataset consists of tensors. Ragged tensors, tensor arrays, and"
              " other types are not supported. Additionally, datasets with nested tensors"
              " are not supported.",
              INVALID_PARAMETER_VALUE,
          )
      return _infer_schema(
          {
              # MLflow Schemas currently require each tensor to have a name, if more than
              # one tensor is defined. Accordingly, use the index as the name
              str(i): data_element
              for i, data_element in enumerate(numpy_data)
          }
      )
  
imports: import json
  import logging
  from functools import cached_property
  from typing import Any, Dict, Optional, Tuple, Union
  import numpy
  from mlflow.data.dataset import Dataset
  from mlflow.data.dataset_source import DatasetSource
  from mlflow.data.digest_utils import compute_tensor_digest, compute_tensorflow_dataset_digest
  from mlflow.data.pyfunc_dataset_mixin import PyFuncConvertibleDatasetMixin, PyFuncInputsOutputs
  from mlflow.data.schema import TensorDatasetSchema
  from mlflow.exceptions import MlflowException
  from mlflow.models.evaluation.base import EvaluationDataset
  from mlflow.protos.databricks_pb2 import INTERNAL_ERROR, INVALID_PARAMETER_VALUE
  from mlflow.types.schema import Schema
  from mlflow.types.utils import _infer_schema
  from mlflow.utils.annotations import experimental
label_desc: Use image node_id 11 for calling the TensorFlowDataset obj's underlying member method code with example usage: obj._get_schema_from_tf_dataset_tuple_numpy_data(numpy_data) and returns: _infer_schema