class_docstr: Represents a HuggingFace dataset for use with MLflow Tracking.
class_docstr_tok: ["Represents","a","HuggingFace","dataset","for","use","with","MLflow","Tracking","."]
docstr: Args:
      ds: A Hugging Face dataset. Must be an instance of `datasets.Dataset`.
          Other types, such as :py:class:`datasets.DatasetDict`, are not supported.
      source: The source of the Hugging Face dataset.
      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",":","ds",":","A","Hugging","Face","dataset",".","Must","be","an","instance","of","`","datasets.Dataset","`",".","Other","types",",","such","as",":","py",":","class",":","`","datasets.DatasetDict","`",",","are","not","supported",".","source",":","The","source","of","the","Hugging","Face","dataset",".","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,
      ds: "datasets.Dataset",
      source: HuggingFaceDatasetSource,
      targets: Optional[str] = None,
      name: Optional[str] = None,
      digest: Optional[str] = None,
  ):
      """
      Args:
          ds: A Hugging Face dataset. Must be an instance of `datasets.Dataset`.
              Other types, such as :py:class:`datasets.DatasetDict`, are not supported.
          source: The source of the Hugging Face dataset.
          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.
      """
      if targets is not None and targets not in ds.column_names:
          raise MlflowException(
              f"The specified Hugging Face dataset does not contain the specified targets column"
              f" '{targets}'.",
              INVALID_PARAMETER_VALUE,
          )
  
      self._ds = ds
      self._targets = targets
      super().__init__(source=source, name=name, digest=digest)
  
imports: import json
  import logging
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Dict, Mapping, Optional, Sequence, Union
  from mlflow.data.dataset import Dataset
  from mlflow.data.digest_utils import compute_pandas_digest
  from mlflow.data.huggingface_dataset_source import HuggingFaceDatasetSource
  from mlflow.data.pyfunc_dataset_mixin import PyFuncConvertibleDatasetMixin, PyFuncInputsOutputs
  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 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 HuggingFaceDataset object from inherited base classes: Dataset, PyFuncConvertibleDatasetMixin with example: obj = HuggingFaceDataset(ds, source, targets, name, digest)