Module: tff.framework

Libraries for extending the TensorFlow Federated core library.


executors_errors module: Custom exceptions for TFF executors.


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

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

class ComposingExecutorFactory: Factory class encapsulating executor compositional logic.

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 Context: Context objects evaluate invocations of computations.

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

class DataBackend: Abstract interface for data backends.

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

class DataExecutor: The data executor is responsible for the data building block.

class EagerTFExecutor: The eager executor only runs TensorFlow, synchronously, in eager mode.

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

class Executor: Represents the abstract interface that all executors must implement.

class ExecutorFactory: Interface defining executor factories.

class ExecutorService: A wrapper around a target executor that makes it into a gRPC service.

class ExecutorValue: Represents the abstract interface for values embedded within executors.

class FederatedComposingStrategy: A strategy for composing federated types and intrinsics in disjoint scopes.

class FederatedResolvingStrategy: A strategy for resolving federated types and intrinsics.

class FederatingExecutor: An executor for handling federated types and intrinsics.

class FederatingStrategy: The abstract interface federating strategies must implement.

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

class PlacementLiteral

class ReconstructOnChangeExecutorFactory: ExecutorFactory exposing hook to construct executors on environment change.

class ReferenceResolvingExecutor: The lambda executor handles lambda expressions and related abstractions.

class RemoteExecutor: The remote executor is a local proxy for a remote executor instance.

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

class ResourceManagingExecutorFactory: Implementation of executor factory holding an executor per cardinality.

class SizeInfo: Structure for size information from SizingExecutorFactory.get_size_info().

class SizingExecutorFactory: A executor factory holding an executor per cardinality.

class ThreadDelegatingExecutor: The concurrent executor delegates work to a separate thread.

class TransformingExecutor: This executor transforms computations prior to executing them.

class UnplacedExecutorFactory: ExecutorFactory to construct executors which cannot understand placement.


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

check_allowed_ops(...): Checks any Tensorflow computation contains only allowed ops.

check_disallowed_ops(...): Raises error on disallowed ops in any Tensorflow computation.

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

deserialize_type(...): Deserializes 'type_proto' as a computation_types.Type.

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

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

get_session_token(...): Returns a string tensor identifying the current session.

local_executor_factory(...): Constructs an executor factory to execute computations locally.

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

remote_executor_factory(...): Create an executor backed by remote workers.

remote_executor_factory_from_stubs(...): Create an executor backed by remote workers.

replace_intrinsics_with_bodies(...): Iterates over all intrinsic bodies, inlining the intrinsics in comp.

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

serialize_type(...): Serializes 'type_spec' as a pb.Type.

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

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

sizing_executor_factory(...): Constructs an executor factory to execute computations locally with sizing.

thread_debugging_executor_factory(...): Constructs a simplified execution stack to execute local computations.

type_from_tensors(...): Builds a tff.Type from supplied tensors.

type_to_tf_tensor_specs(...): Returns nested structure of tf.TensorSpecs for a given TFF type.

Type Aliases