Represents a value constructed by the prefetching data source.
Inherits From: Ingestable
, TypedObject
, CardinalityCarrying
tff.program.FetchedValue(
executor: executor_base.Executor,
executor_value: executor_value_base.ExecutorValue,
cardinality: Mapping[tff.framework.PlacementLiteral
, int],
defining_coro_fn: Callable[[executor_base.Executor], Awaitable[executor_value_base.ExecutorValue]
]
)
Args |
executor
|
Instance of tff.framework.Executor in which executor_value
is embedded.
|
executor_value
|
A representation of a value embedded in a TFF executor.
Must be embedded in the executor argument of the initializer.
|
cardinality
|
The cardinality of the executor value. A mapping from TFF
placement literals (e.g. tff.CLIENTS, tff.SERVER) to ints.
|
defining_coro_fn
|
A coroutine function accepting an executor argument, and
returning the result of embedding the concrete value which backs this
FetchedValue in that executor.
|
Attributes |
cardinality
|
Returns the cardinality information associated with this object.
|
type_signature
|
Returns the TFF type of this object (an instance of tff.Type ).
|
Methods
ingest
View source
ingest(
executor
)
Causes this object to ingest itself into the given executor.
Args |
executor
|
An instance of executor_base.Executor to ingest into.
|
Returns |
An instance of executor_value_base.ExecutorValue returned by the
executor.
|