# tfr.keras.pipeline.DatasetHparams

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/ranking/blob/v0.5.3/tensorflow_ranking/python/keras/pipeline.py#L337-L366) |

Hyperparameters used in `BaseDatasetBuilder`.

    tfr.keras.pipeline.DatasetHparams(
        train_input_pattern: str,
        valid_input_pattern: str,
        train_batch_size: int,
        valid_batch_size: int,
        list_size: Optional[int] = None,
        valid_list_size: Optional[int] = None,
        dataset_reader: Any = https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/pipeline/DatasetHparams/dataset_reader,
        convert_labels_to_binary: bool = False
    )

Hyperparameters to be specified to create the dataset_builder.

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `train_input_pattern` | A glob pattern to specify the paths to the input data for training. |
| `valid_input_pattern` | A glob pattern to specify the paths to the input data for validation. |
| `train_batch_size` | An integer to specify the batch size of training dataset. |
| `valid_batch_size` | An integer to specify the batch size of valid dataset. |
| `list_size` | An integer to specify the list size. When None, data will be padded to the longest list in each batch. |
| `valid_list_size` | An integer to specify the list size in valid dataset. When not specified, valid dataset uses the same list size as `list_size`. |
| `dataset_reader` | A function or class that can be called with a `filenames` tensor and (optional) `reader_args` and returns a `Dataset`. Defaults to [`tf.data.TFRecordDataset`](https://www.tensorflow.org/api_docs/python/tf/data/TFRecordDataset). |
| `convert_labels_to_binary` | A boolean to indicate whether to use binary label. |

<br />

## Child Classes

[`class dataset_reader`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/pipeline/DatasetHparams/dataset_reader)

## Methods

### `__eq__`

    __eq__(
        other
    )

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| convert_labels_to_binary | `False` |
| list_size | `None` |
| valid_list_size | `None` |

<br />