Module: tff.framework

Stay organized with collections Save and categorize content based on your preferences.

Libraries for extending the TensorFlow Federated core library.

Classes

class AsyncContext: An asynchronous context to evaluate of computations.

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

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

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

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 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 ExecutorFactory: Interface defining executor factories.

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

class MergeableCompExecutionContext: Context which executes mergeable computations in subrounds.

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

class PlacementLiteral

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

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

class SyncContext: A synchronous context to evaluate of computations.

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

Functions

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_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_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_value(...): Serializes a value into executor_pb2.Value.

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

Type Aliases

CardinalitiesType