class_docstr: Represents a TensorFlow dataset for use with MLflow Tracking.
class_docstr_tok: ["Represents","a","TensorFlow","dataset","for","use","with","MLflow","Tracking","."]
docstr: Args:
      features: A TensorFlow dataset or tensor of features.
      source: The source of the TensorFlow dataset.
      targets: A TensorFlow dataset or tensor of targets. Optional.
      name: The name of the dataset. E.g. "wiki_train". If unspecified, a name is
          automatically generated.
      digest: The digest (hash, fingerprint) of the dataset. If unspecified, a digest
          is automatically computed.
docstr_tok: ["Args",":","features",":","A","TensorFlow","dataset","or","tensor","of","features",".","source",":","The","source","of","the","TensorFlow","dataset",".","targets",":","A","TensorFlow","dataset","or","tensor","of","targets",".","Optional",".","name",":","The","name","of","the","dataset",".","E.g",".","``","wiki_train","''",".","If","unspecified",",","a","name","is","automatically","generated",".","digest",":","The","digest","(","hash",",","fingerprint",")","of","the","dataset",".","If","unspecified",",","a","digest","is","automatically","computed","."]
code: def __init__(
      self,
      features,
      source: DatasetSource,
      targets=None,
      name: Optional[str] = None,
      digest: Optional[str] = None,
  ):
      """
      Args:
          features: A TensorFlow dataset or tensor of features.
          source: The source of the TensorFlow dataset.
          targets: A TensorFlow dataset or tensor of targets. Optional.
          name: The name of the dataset. E.g. "wiki_train". If unspecified, a name is
              automatically generated.
          digest: The digest (hash, fingerprint) of the dataset. If unspecified, a digest
              is automatically computed.
      """
      import tensorflow as tf
  
      if not isinstance(features, tf.data.Dataset) and not tf.is_tensor(
          features
      ):
          raise MlflowException(
              f"'features' must be an instance of tf.data.Dataset or a TensorFlow Tensor."
              f" Found: {type(features)}.",
              INVALID_PARAMETER_VALUE,
          )
  
      if (
          tf.is_tensor(features)
          and targets is not None
          and not tf.is_tensor(targets)
      ):
          raise MlflowException(
              f"If 'features' is a TensorFlow Tensor, then 'targets' must also be a TensorFlow"
              f" Tensor. Found: {type(targets)}.",
              INVALID_PARAMETER_VALUE,
          )
  
      if (
          isinstance(features, tf.data.Dataset)
          and targets is not None
          and not isinstance(targets, tf.data.Dataset)
      ):
          raise MlflowException(
              "If 'features' is an instance of tf.data.Dataset, then 'targets' must also be an"
              f" instance of tf.data.Dataset. Found: {type(targets)}.",
              INVALID_PARAMETER_VALUE,
          )
  
      self._features = features
      self._targets = targets
      super().__init__(source=source, name=name, digest=digest)
  
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 1 to create a new TensorFlowDataset object from inherited base classes: Dataset, PyFuncConvertibleDatasetMixin with example: obj = TensorFlowDataset(features, source, targets, name, digest)