Module: tff.framework

Libraries for extending the TensorFlow Federated core library.


class AsyncContext: An asynchronous context to evaluate of computations.

class AsyncExecutionContext: An asynchronous execution context backed by an executor_base.Executor.

class Block: A representation of a block of code in TFF's internal language.

class Call: A representation of a function invocation in TFF's internal language.

class CardinalityCarrying: Asbtract interface for objects that carry information about cardinality.

class CardinalityFreeDataDescriptor: Represent data-yielding computations with unspecified cardinalities.

class CompiledComputation: A representation of a fully constructed and serialized computation.

class ComputationBuildingBlock: The abstract base class for abstractions in the TFF's internal language.

class ConcreteComputation: A representation of a pb.Computation in the tff.Computation interface.

class ContextStack: An interface to a context stack for the API to run against.

class Data: A representation of data (an input pipeline).

class DataDescriptor: Represents fully-specified data-yielding computations.

class ExecutorFactory: Interface defining executor factories.

class Ingestable: Abstract interface for objects able to ingest themselves in an executor.

class Intrinsic: A representation of an intrinsic in TFF's internal language.

class Lambda: A representation of a lambda expression in TFF's internal language.

class MergeableCompExecutionContext: Context which executes mergeable computations in subrounds.

class MergeableCompForm: A data class for computations containing a single logical aggregation.

class Placement: A representation of a placement literal in TFF's internal language.

class PlacementLiteral

class Reference: A reference to a name defined earlier in TFF's internal language.

class RemoteExecutorStub: Represents the interface of stubs call to an remote executor instance.

class RetryableError: Raised when execution fails and can be retried.

class Selection: A selection by name or index from a struct-typed value in TFF's language.

class Struct: A struct with named or unnamed elements in TFF's internal language.

class SyncContext: A synchronous context to evaluate of computations.

class SyncExecutionContext: A synchronous execution context backed by an executor_base.Executor.

class UnexpectedBlockError: Inappropriate argument type.


CreateDataDescriptor(...): Constructs a DataDescriptor instance targeting a tff.DataBackend.

deserialize_computation(...): Deserializes 'tff.Computation' as a pb.Computation.

deserialize_value(...): Deserializes a value (of any type) from executor_pb2.Value.

get_context_stack(...): Returns the context stack.

local_cpp_executor_factory(...): Returns an execution context backed by C++ runtime.

merge_cardinalities(...): Merges dicts existing and to_add, checking for conflicts.

serialize_computation(...): Serializes 'tff.Computation' as a pb.Computation.

serialize_value(...): Serializes a value into executor_pb2.Value.

set_default_context(...): Places ctx at the bottom of the stack.

Type Aliases