# tff.framework.DataDescriptor

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

Represents fully-specified data-yielding computations.

Inherits From: [`CardinalityFreeDataDescriptor`](https://www.tensorflow.org/federated/api_docs/python/tff/framework/CardinalityFreeDataDescriptor), [`Ingestable`](https://www.tensorflow.org/federated/api_docs/python/tff/framework/Ingestable), [`TypedObject`](https://www.tensorflow.org/federated/api_docs/python/tff/TypedObject), [`CardinalityCarrying`](https://www.tensorflow.org/federated/api_docs/python/tff/framework/CardinalityCarrying)

    tff.framework.DataDescriptor(
        comp: Optional[https://www.tensorflow.org/federated/api_docs/python/tff/Computation],
        arg: object,
        arg_type: https://www.tensorflow.org/federated/api_docs/python/tff/types/Type,
        cardinality: Optional[int] = None
    )

Similar to CardinalityFreeDataDescriptor, but additionally accepts a
cardinality argument, allowing callers to explcitly specify the number
of clients this data descriptor is intended to represent.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `comp` | The computation that materializes the data, of some type `(T -> U)` where `T` is the type of the argument `arg` and `U` is the type of the materialized data that's being produced. This can be `None`, in which case it's assumed to be an identity function (and `T` in that case must be identical to `U`). |
| `arg` | The argument to be passed as input to `comp` if `comp` is not `None`, or to be treated as the computed result. Must be recognized by the TFF runtime as a payload of type `T`. |
| `arg_type` | The type of the argument (`T` references above). An instance of [`tff.Type`](https://www.tensorflow.org/federated/api_docs/python/tff/types/Type). |
| `cardinality` | If of federated type, placed at clients, this int specifies the number of clients represented by this DataDescriptor. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if the arguments don't satisfy the constraints listed above. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `cardinality` | Returns the cardinality information associated with this object. |
| `type_signature` | Returns the TFF type of this object (an instance of [`tff.Type`](https://www.tensorflow.org/federated/api_docs/python/tff/types/Type)). |

<br />

## Methods

### `ingest`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    ingest(
        executor
    )

Causes this object to ingest itself into the given executor.

<br />

<br />

<br />

| Args ||
|---|---|
| `executor` | An instance of `executor_base.Executor` to ingest into. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| An instance of `executor_value_base.ExecutorValue` returned by the executor. ||

<br />