class_docstr: Adapter that handles `tf.data.Dataset`.
docstr: Validates `__init__` arguments.
docstr_tok: ["Validates","`","__init__","`","arguments","."]
code: def _validate_args(self, y, sample_weights, steps):
      """Validates `__init__` arguments."""
      # Arguments that shouldn't be passed.
      if not is_none_or_empty(y):
          raise ValueError(
              "`y` argument is not supported when using "
              "tf.Data.dataset as input."
          )
      if not is_none_or_empty(sample_weights):
          raise ValueError(
              "`sample_weight` argument is not supported when using "
              "tf.Data.dataset as input."
          )
  
      size = cardinality.cardinality(self._dataset).numpy()
      if size == cardinality.INFINITE and steps is None:
          raise ValueError(
              "When providing an infinitely repeating tf.data.Dataset, you must specify "
              "the number of steps to run."
          )
  
file_path: elegy/elegy/data/tf_dataset_adapter.py
imports: from tensorflow.python.data.experimental.ops import cardinality
  from tensorflow.python.data.ops import dataset_ops
  from .data_adapter import DataAdapter
  from .utils import flatten, is_none_or_empty, map_structure
label_desc: Use image node_id 10 for calling the TFDatasetAdapter obj's underlying member method code with example usage: obj._validate_args(y, sample_weights, steps) without return types