- Implemented divisive split logic needed by DistributeAggregateForm, which is currently under development and will replace MapReduceForm and BroadcastForm in the future.
- Renamed the
cpp_execution_context.(create|set)_local_cpp_execution_context
function to match the name ofexecution_context.(create|set)_(sync|async)_local_cpp_execution_context
. - Deleted the sizing Python execution context and executor.
- Deleted the thread debugging Python execution context and executor.
- Removed
ExecutorService
from the public API. - Deleted the local async python execution context.
- Enabled and fixed python type annotations in some modules in the
executors
,types
, andcore
package.
- Added a
LayoutMap
message in the computation proto for TensorFlowDTensor
based execution.
- Removed the
compiler_fn
parameter from the high level*_mergeable_execution_context
functions.
- Aligned the context types allowed by the
tff.program.NativeFederatedContext
and thetff.program.PrefetchingDataSource
. - Updated
build_functional_model_delta_update
to useReduceDataset
ops to rely on MLIR Bridge for XLA compilation and TPU usage.
- Added parameter and implementation for C++ remote executor to stream the values in a structure across the gRPC interface.
- Added
tff.backends.native.desugar_and_transform_to_native
to the public API. - Replaced
GroupNorm
implementation with implementation from Keras. - Added
tff.simulations.datasets.flair
APIs for the FLAIR dataset.
- Removed file extension for
model_output_manager
used intff.learning.programs
- Enabled and fixed python type annotations in some modules.
- Changed
tff.learning.algorithms.build_weighted_fed_prox
parameter validation to allowproximal_strength = 0.0
, matching the pydoc.
- Integrated the
CppToPythonExecutorBridge
into theCPPExecutorFactory
. - Changed Python Remote Executor to decompose and stream structures in Compute
and CreateValue when _stream_structs is true. Added a bool parameter
stream_structs
totff.backends.native.set_localhost_cpp_execution_context()
API.
- Renamed
tff.backends.native.set_localhost_cpp_execution_context()
tobackends.native.set_sync_local_cpp_execution_context()
. - Renamed
tff.framework.ExecutionContext
totff.framework.SyncExecutionContext
to be consistent withtff.framework.AsyncExecutionContext
. - Removed the
SyncSerializeAndExecuteCPPContext
andAsyncSerializeAndExecuteCPPContext
classes.
- Fixed usage of
typing.Generic
in the learning package. - Enabled pytype analysis for some modules.
- Fixed lint and formatting issues for some modules.
- Improved the Python type annotations for
tff.program
API. - Extended the metrics interface on FunctionalModel to accept the entire
BatchOutput
structure from the modelforward_pass
(not just the predictions). - Introduced a DTensor Executor.
- Fixed async RuntimeWarning in the
tff.program.NativeFederatedContext
.
- Improve serialization method to allow structures larger than 2 GiB (~500
million model parameters):
tff.learning.models.FunctionalModel
tff.programs.FileProgramStateManager
- Fix a bug using
copy.deepcopy
for structures of awaitables (non-pickable) intff.learning.programs
. - Fix a bug when resuming an evaluation in
tff.learning.programs.EvaluationManager
where the restarted evaluation would overwrite released metrics.
- Reduced memory usage for entropy compression.
- Updated
com_google_protobuf
version tov3.19.0
. - Removed dependency on
six
.
- Removed default value for the key parameter from the abstract base class
tff.program.ReleaseManager
.
- Fixed a whitespace syntax issue with shutting down a process when using the localhost C++ execution context.
- Modified
tff.simulation.build_uniform_sampling_fn
so that the output raises on non-integer inputs. - Only wait a subprocess instance if it is not None.
- TFF-C++ runtime now installed by default. Note that this release will have a significantly larger PIP package size.
- Introduce
tff.learning.programs
for federated program-logic using thetff.program
APIs. - Updated
tensorflow
to version2.11.0
. - Updated
tensorflow_compression
to version2.11.0
. - Updated
bazel_skylib
to version1.3.0
.
- Skip model updates that are non-finite in
tff.learning.templates.build_apply_optimizer_finalizer
.
- Removed deprecated APIs in
tff.learning.framework
- Update the Python package scripts to use Python 3.10 by default.
- Remove module wildcard imports from init.py files in TFF.
- Update the Python package scripts to use Python 3.10 by default.
- Remove
functools.wraps
withintff.tf_computation
. - Fix typo in iNaturalist dataset docstring.
- Added
tff.learning.models.FunctionModel
support to all methods intff.learning.algorithms
. - Added support for
tf.data.DataSpec
totff.types.infer_unplaced_type
. - Use a
tensorflow::ThreadPool
for parallelism inside the C++TensorFlowExecutor
. - Introduced a new
tff.experimental_tf_fn_computation
tracing decorator that usesFunctionDef
instead ofGraphDef
tracing, providingtf.function
auto-control-dependencies. - Renamed
number_of_clients
tonum_clients
in the federated program API. - Replaced the following API with composers API in
tff.learning.templates
.tff.learning.framework.build_model_delta_optimizer_process
tff.learning.framework.ClientDeltaFn
- Fixed a bug in the “Client-efficient large-model federated learning” tutorial to use the correct dense shape.
- Added
tff.learning.models.FunctionalModel
support totff.learning.algorithms.build_mime_lite
. - Updated
tensorflow-privacy
to version0.8.6
. - Added an abstract interface describing an asynchronous context
- Removed references to
tff.framework.Context
. - Added
tff.simulation.datasets.gldv2.get_synthetic
. - Added prefetching data source in
tff.program.PrefetchingDataSource
.
- Deleted deprecated
tff.learning.framework.build_encoded_broadcast_process_from_model
. - Deprecated
tff.learning.ModelWeights
and aliastff.learning.framework.ModelWeights
, has now moved totff.learning.models.ModelWeights
. Code should be updated before the next release.
- Fixed a bug with variable creation order of metrics in
tff.learning.models.functional_model_from_keras
. - Improved
tff.tf_computation
tracing to also tracefunctools.partial
objects.
- Colab compatibility: TFF requires Python 3.9 while Colab runtime uses Python 3.7.
- Added support for Python 3.10.
- Improved support for
numpy
values in thetff.program
API. - Increased dataset serialization size limit to 100MB.
- Added a new method
tff.learning.ModelWeights.convert_variables_to_arrays
. - Added new metrics aggregation factories under
tff.learning.metrics
. - Parallelized aggregation in
tff.framework.ComposingExecutorFactory
.
- Updated to use
jax
andjaxlib
version0.3.14
. - Renamed
tff.program.CoroValueReference
totff.program.AwaitableValueReference
to reflect the relaxed contract.
- Improved documentation for
tff.simulation.build_uniform_sampling_fn
,tff.learning.robust_aggregator
,tff.aggregators.PrivateQuantileEstimationProcess
. - Fixed documentation bug for tutorial “High-performance Simulation with Kubernetes”.
- Fixed bug where momentum hyperparameters were added to SGDM optimizer when momentum was set to 0.
- Removed assertion that preprocessed datasets in a
tff.simulation.baselines.BaselineTask
have the same element structure. - Fixed a memory leak when moving numpy arrays across the Python and C++ boundary in the C++ executor.
- Fixed bug in the federated program API when using multiple release managers to release the same value.
This release contains contributions from many people at Google, as well as: Madhava Jay, nbishdev@
- Added support for
tff.learning.models.FunctionalModel
totff.learning.algorithms.build_fed_sgd
andtff.learning.algorithms.build_fed_prox
. - Increased the gRPC message limit from 1 GB to 2 GB.
- Added hyperparameter getters/setters to various components in tff.learning.
- Updated
tensorflow
to version2.10
.
- Improved documentation for
tff.analytics.heavy_hitters.iblt.build_iblt_computation()
. - Fixed incorrect docstring of
tff.federated_select
. - Fixed typo in federated program example.
- Added get/set_hparams methods to
tff.learning.templates.ClientWorkProcess
. - Added
tff.learning.algorithms.build_mime_lite_with_optimizer_schedule
. - Updated
tensorflow-privacy
to version0.8.5
. - Added
tff.learning.entropy_compression_aggregator
. - Added
tff.aggregators.EliasGammaEncodedSumFactory
. - Added
tff.program.ClientIdDataSource
andtff.program.ClientIdDataSourceIterator
, for working with a data source of ids of federated clients.
- Removed prototype IREE backend.
- Added new dependency on TensorFlow Compression.
- Fixed implementation of the
loading_remote_data
tutorial. - Corrected the docstring of
tff.simulation.datasets.stackoverflow.get_synthetic
.
- TFF's Python 3.9 typing conflicts with Colab's Python 3.7 runtime.
- Updated to use
Bazel
version5.3.0
. - Updated the conventions used to specify the version of a Python dependency, see https://github.com/tensorflow/federated/blob/main/requirements.txt for more information.
- Updated the
setup.py
to explicitly fail topip install
in Python 3.10. This has always been failing at runtime, but now explicitly fails to install usingpip
. - Refreshed loading_remote_data notebook content and added content for
FederatedDataSource
. - Added a TFF
type_signature
attribute to objects of typeMapReduceForm
. - Added a series of slides to the GitHub repo (so not part of the PIP package) which detail a technical deep dive into TFF.
- Bumped tf-privacy version to
0.8.4
. - Bumped tf-model-optimization version to
0.8.3
. - Removed
initialize
fromMapReduceForm
. SequenceType
now automatically casts anyStructWithPythonType
that contains alist
to atuple
fortf.data
compatibility.- Unified the
model_fn
andmodel
parameters oftff.learning.algorithms.build_weighted_fed_avg
. MapReduceForm
now takes atype_signature
argument in its constructor, and no longer takes aninitialize
argument.MapReduceForm
no longer contains aninitialize
attribute.
- Relaxed overly strict type equivalence check to assignability in TFF-TF code generation.
- Extend
tff.analytics.heavy_hitters.iblt
withcreate_chunker
API for encoding non-Unicode strings. - Extend
tff.aggregators.DifferentiallyPrivateFactory.tree_aggregation
with an optionalrecord_aggregation_factory
argument.
- Replaced
ModularClippingSumFactory
withSecureModularSumFactory
intff.analytics.build_hierarchical_histogram_process
.
- TFF's python 3.9 typing conflicts with Colab's Python 3.7 support.
- Add a MimeLite implementation that allows from optimizer learning rate
scheduling in
tff.learning.algorithms.build_mime_lite_with_optimizer_schedule
.
- None
- None
- TFF's python 3.9 typing conflicts with Colab's Python 3.7 support.
- Added
ReleaseManager
s to make authoring program logic more convenient. - Updated TFFs
attrs
dependency to version21.4.0
. - Update TFFs
tensorflow-privacy
dependency to version0.8.1
.
- Changed
tff.learning.BatchOutput
from an attrs class to a namedtuple. - Removed unused
tff.learning.framework.parameter_count_from_model
API.
- Add tests for
namedtuple
s in thetff.program
package. - Add
num_subrounds
parameter to the mergeable context, allowing callers to optionally sequentialize subrounds. - Add metrics support to
tff.learning.models.FunctionalModel
, including updates to the helper functioncreate_functional_metric_fns
and the downstream callertff.learning.algorithms.build_weighted_fed_avg
.
- Fix typo in the types constructed for testing the
tff.program
package. - Fix some program example typos.
- Fix tests that don't seem to be running under the CI.
- Fix naming bug for Python mergeable execution.
- Ensure exceptions raised from remote executor stub implement gRPC error interface.
- Update
tff.structure.Struct
integration with JAX pytrees to not flatten the entire structure. - Use Python 3.7 compatible type annotations until Colab updates to Python 3.9.
- Update the
MemoryReleaseManager
to savetype_signature
when releasing values. - Add a
type_signature
parameter to theReleaseManager.release
method. - Unify retryability logic between TFF-C++ and TFF-Python.
- Update the TFF contributions and collaboration links to point to the Discord server.
- Move Python executor stacks file to
python_executor_stacks.py
inexecutor_stacks
directory.
- Ensure that dataset deserialization will return ragged and sparse tensors, as needed according to the TFF type of the dataset.
- Make
metric_finalizers
use metric constructors if available.
- Updated tutorials to use
tff.learning.algorithms
API. - Asynchronous TFF execution contexts no longer assume a single global cardinality; they concurrently invoke any computation for which concurrency is requested.
- Removed
tff.learning.build_federated_averaging_process
; users should migrate totff.learning.algorithms.build_weighted_fed_avg
.
- Clarified semantics for TFF-C++ multimachine
Dispose
,DisposeExecutor
, and executor keying, to avoid raising exceptions and spamming logs in the course of normal operation. - Fixed unsigned integer overflow for TFF-C++
max_concurrent_computation_calls
. - Normalizes on call-dominant form before attempting to compile to
MergeableCompForm
, removing spurious failures on dependent-aggregation checking.
- Serialization / deserialization of tf.data.Datasets yielding non-dense
tensors for multimachine runtime may encounter issues:
tff.framework.deserialize_value
may fail to deserialize tf.data.Datasets yielding RaggedTensors or SparseTensors.tff.framework.serialize_value
may fail to serialize tf.data.Datasets yielding SparseTensors.
- New Colab notebook illustrating how to use
DataBackend
to load remote datasets. - Added a CreateDataDescriptor helper function.
- Added a worker binary serving the TFF-C++ executor service.
- Fixed bug with intermediate aggregation and controller failures, causing hangs.
- Updated TensorFlow to
2.9.1
. - Update pybind11 to
2.9.2
. - Re-enable cpp_fast_protos.
- Introduces container class to run coroutines in a dedicated thread, allowing TFF’s synchronous execution interfaces to be used in conjunction with other asyncio code.
- Use latest TFF version in Colab notebook links.
- Rename the helper functions that create test
MeasuredProcess
es. - Add a compiler transform checking Tensorflow computations against list of allowed ops.
- Explicitly specify return types in the
program
package. - Adds convenience function for setting a local async CPP execution context.
- Move jax components into a non-experimental namespace.
- Switch compilation flag
_GLIBCXX_USE_CXX11_ABI
to1
.
- Adds error message logging to TFF C++ execution context.
- Adds test coverage for C++ runtime with aggregators.
- Redefines 'workers going down with fixed clients per round' test.
- Add complete examples of using
DataBackend
with TFF comps. - Updated the MapReduceForm documentation to include the two additional secure sum intrinsics.
- tff.learning
- Relax the type check on LearningProcess from strictly SequenceType to also allow structures of SequenceType.
- Remove usage of
tff.test.TestCase
,tff.test.main()
, and deletetest_case
module. - Update test utility docstrings to use consistent vocabulary.
- Update to TensorFlow 2.9.0
- Rename up
compiler/test_utils
tocompiler/building_block_test_utils
. - Remove some unnecessary usage of
pytype: skip-file
. - Specify the
None
return type ofReleaseManager.release
. - Remove usage of deprecated numpy types.
- Replace depreciated
random_integers
withrandint
.
- Fix numpy warning.
- Added
asyncio.run
call to metrics manager release calls to ensure compatibility with https://github.com/tensorflow/federated/commit/a98b5ed6894c536549da06b4cc7ed116105dfe65. - Added an example and documentation for the Federated Program API.
- Improved
model_update_aggregator
to support structures with mixed floating dtypes. - Create a mirror of
tff.simulation.compose_dataset_computation_with_iterative_process
fortff.learning.templates.LearningProcess
. - Added logging of expected sequential computations to local TFF-C++ runtime.
- Moved asserts from
tff.test.TestCase
totff.test.*
as functions. - Removed
assert_type_assignable_from
function. - Moved
assert_nested_struct_eq
to thetype_conversions_test
module. - Removed
client_train_process
and fedavg_ds_loop comparisons.
- Fixed comparisons to enums in the benchmarks package.
- Fixed
async_utils.SharedAwaitable
exception raiser. - Fixed various lint errors.
- Deprecated
tff.learning.build_federated_averaging_process
. - Added an API to convert
tf.keras.metrics.Metric
to a set of puretf.functions
.
- Renamed
ProgramStateManager.version
toProgramStateManager.get_versions
.
- Fixed the "datasets/" path in the working with TFF's ClientData tutorial.
- Updated .bazelversion to
5.1.1
. - Updated the
tff.program
API to useasyncio
. - Exposed new APIs in the
tff.framework
package:tff.framework.CardinalitiesType
.tff.framework.PlacementLiteral
.tff.framework.merge_cardinalities
.
tff.analytics
- Added new
analytic_gauss_stddev
API.
- Added new
- Renamed
ProgramStateManager.version
toProgramStateManager.get_versions
.
- Fixed some Python lint errors related to linting Python 3.9.
- Cleaned up stale TODOs throughout the codebase.
- Version 0.21.0 currently fails to import in colab if the version of Python is less than Python 3.9. Please use a runtime with a version of Python greater than Python 3.9 or use TFF version 0.20.0.
tff.analytics
- Added new
tff.analytics.IbltFactory
aggregation factory. - Added new IBTL tensor encoder/decoder libraries and uses them in
tff.analytics.heavy_hitters.iblt.build_iblt_computation
.
- Added new
tff.aggregator
- Added
as_weighted_aggregator
to thetff.aggregator.Factory
API.
- Added
tff.learning
- Improved compilation and execution performance of
tff.learning.metrics.secure_sum_then_finalize
by grouping tensors by DType. - Added
set_model_weights
method and default implementation totff.learning.templates.LearningProcess
. - Added a new
reset_metrics
attribute totff.learning.Model
. - Added
schedule_learning_rate
totff.learning.optimizers
. - Added new
tff.learning.ddp_secure_aggregator
for Distributed Differential Privacy.
- Improved compilation and execution performance of
tff.simulation
- Added an option to distort train images in the CIFAR-100 baseline task.
- Changed the default sequence length for the Shakespeare baseline task to a more reasonable value.
- Core
- Switched runtime to create new RemoteExecutors with different cardinalities, rather than resetting the cardinality in the remote service.
- Removed support for Python 3.7 and 3.8, TFF supports 3.9 and later.
- Removed deprecated attributes
report_local_outputs
andfederated_output_computation
fromtff.learning.Model
- Removed the
ingest
method fromtff.Context
- Multiple typos in tests, code comments, and pydoc.
- Sequences (datasets) of SparseTensors don't work on the C++ runtime.
- Computations when
CLIENTS
cardinality is zero doesn't work on the Python runtime. - Assigning variables to a Keras model after construction inside a
model_fn
results in a non-deterministic graph.
- Added
tff.program
API; this API is still in active development but can be used to compose shared and platform specific: program logic, components, and privacy concepts to create federated programs. - Added support for Python 3.9.
- Added CelebA and iNaturalist datasets to
tff.simulation.datasets
. - Added
tff.analytics
API for federated analytics, including private heavy hitters algorithms. - Added
tff.learning.algorithms
API, including TFF implementations of FedProx, FedAvg with learning rate scheduling, federated k-Means, and MimeLite. - Added
tff.learning.metrics
API to support easy configuration of cross-client metrics aggregation via the newmetrics_aggregator
argument. - Added
metrics_aggregator
argument totff.learning.build_federated_averaging_process
andtff.learning.build_federated_evaluation
. - Added
report_local_unfinalized_metrics
andmetric_finalizers
methods totff.learning.Model
and deprecatedreport_local_outputs
andfederated_output_computation
. - Added
tff.learning.optimizers
API for building purely functional optimizers and implementations of SGD, Adagrad, Rmsprop, Adam, Yogi, - Added
tff.learning.reconstruction
API for building partially local federated learning algorithms, including Federated Reconstruction. - Added
tff.learning.templates
API to support building learning algorithms in a modular fashion. - Added
tff.simulation.baselines
API to support evaluating learning algorithms on a suite of representative tasks. - Added
tff.aggregators.DifferentiallyPrivateFactory.tree_aggregation
to support the DP-FTRL algorithm. - Added
tff.aggrgators.SecureModularSumFactory
- Added
tff.aggregators.DiscreteFourierTransformFactory
andtff.aggregators.HadamardTransformFactory
to support rotation-based aggregators. - Added
tff.aggregators.concat_factory
for aggregating structures as a single tensor. - Added
tff.backends.native.create_mergeable_comp_execution_context
,tff.backends.native.set_mergeable_comp_execution_context
; these can be used with a distributed runtime to scale to tens of thousands of clients. - Improved performance of many
tff.simulation.datasets.ClientData
subclasses. - Added
tff.simulation.datasets.ClientData.serializable_dataset_fn
attribute, enabling dataset creation within TF/TFF computations. - Added
debug_measurements
option to aggregators intff.learning
. - Added support for unambiguous zero-client aggregations.
- Added support for Python dataclasses as function parameters and return values for TFF computations.
- Added automatic insertion of
tff.federated_zip
to invocation of user-defined TFF federated computations. - Added utilities to
tff.simulation.datasets
for saving federated datasets to a SQL database compatible withtff.simulation.datasets.SqlClientData
. - Added
tff.learning.models.FunctionalModel
andtff.learning.models.functional_model_from_keras
. - Increased max flow of tensors. Tensors now flow here, there, and everywhere.
- Updated the Python dependencies:
- Updated
absl-py
to version1.0.0
. - Updated
attrs
to version21.2.0
. - Added
farmhashpy
version0.4.0
. - Updated
jax
to version0.2.27
. - Updated
jaxlib
to version0.1.76
. - Updated
numpy
to version1.21.4
. - Removed
retrying
. - Updated
tensorflow-model-optimization
to version0.7.1
. - Updated
tensorflow-model-optimization
to version0.7.3
. - Updated
tensorflow
to version2.8.0
. - Added support for building many dependencies including
tensorflow
using Bazel. - Updated the Bazel dependencies:
- Updated
rules_python
to version0.5.0
. - Updated
com_google_protobuf
to versionv3.18.0-rc1
. - Added
absl_py
version1.0.0
. - Added
com_google_googletest
versionrelease-1.11.0
. - Added
io_bazel_rules_go
versionv0.29.0
. - Added
bazel_skylib
version1.0.3
. - Added
pybind11_abseil
. - Added
pybind11_bazel
. - Added
pybind11_protobuf
. - Added
com_google_absl
version20211102.0
. - Added
tensorflow_org
versionv2.8.0
.
- Removed support for building source on MacOS.
- Removed support for Python 3.6.
- Removed symbol
tff.framework.type_contains
, usetff.types.contains
instead. - Removed many symbols from
tff.simulation
, these can be found intff.program
instead. - Removed support for converting non-OrderedDict mapping types to
tff.Value
s. - Removed
tff.simulation.datasets.ClientData.from_clients_and_fn
in favor oftff.simulation.datasets.ClientData.from_clients_and_tf_fn
. - Restricted
tff.simulation.datasets.ClientData.preprocess
to only support TF-serializable functions. - Removed
tff.backends.reference
, and the reference context it contained. - Removed
tff.learning.build_federated_sgd_process
in favor oftff.learning.algorithms.build_fed_sgd
. - Removed
tff.simulation.run_simulation
in favor oftff.simulation.run_training_process
. - Removed
tff.learning.framework.EnhancedModel
. - Removed
tff.learning.framework.build_stateless_mean
.
- Fixed broken links in documentation.
- Fixed many pytype errors.
- Fixed some inconsistencies in Bazel visibility.
- Fixed bug where
tff.simulation.datasets.gldv2.load_data()
would result in an error.
- Introduced new intrinsics:
federated_select
andfederated_secure_select
. - New
tff.structure_from_tensor_type_tree
to help manipulate structures oftff.TensorType
into structures of values. - Many new
tff.aggregators
factory implementations. - Introduced
tf.data
concept for data URIs. - New
tff.type
package with utilities for working withtff.Type
values. - Initial experimental support for
tff.jax_computation
. - Extend
tff.tf_computation
support toSpareTensor
andRaggedTensor
.
- Update gRPC dependency to 1.34.
- Moved
ClientData
interface and implementations totff.simulation.datasets
. - Renamed
tff.utils.update_state
totff.structure.update_struct
. - Removed the
tff.utils
namespace, all symbols have migrated, many totff.aggregators
. - Moved infinite EMNIST dataset to federated research repository.
- Removes
rpc_mode
argument to remote executors, along with streaming mode. - Removes deprecated
tff.federated_apply
. - Removes
tff.federated_reduce
, all usages can usetff.federated_aggregate
. - Removes
HDF5ClientData
andh5py
pip dependency. - Removes
setattr
functionality ontff.ValueImpl
.
- Improved
tf.GraphDef
comparisons. - Force close generators used for sending functions to computation wrappers, avoiding race conditions in Colab.
- Fix tracing libraries asyncio usage to be Python3.9 compatible.
- Fix issue with destruction of type intern pool destructing and
abc
. - Fix type interning for tensors with unknown dimensions.
- Fix
ClientData.create_dataset_from_all_clients
consuming unreasonable amounts of memory/compute time.
- Extended the
tff.simulation
package to add many new tools for running simulations (checkpoints and metrics managers, client sampling functions). - Extended the
tff.aggregators
package with a number of new aggregation factories. - Added the
tff.structure
API to expose theStruct
class and related functions. - Added the
tff.profiler
API to expose useful profiling related functions. - Added the
tff.backends.test
package to expose backends that focused on testing specifically a way to test a computation with afederated_secure_sum
intrinsic. - Added the
tff.experimental
package to expose less stable API.
- Replaced the
tff.aggregators.AggregationProcessFactory
abstract base class with thetff.aggregators.UnweightedAggregationFactory
and thetff.aggregators.WeightedAggregationFactory
classes. - Replaced the
tff.aggregators.ZeroingFactory
class with atff.aggregators.zeroing_factory
function with the same input arguments. - Replaced the
tff.aggregators.ClippingFactory
class with atff.aggregators.clipping_factory
function with the same input arguments. - Updated
tensorflow
package dependency to2.4.0
. - Updated
absl-py
package dependency to0.10
. - Updated
grpcio
package dependency to1.32.0
. - Added a
jaxlib
package dependency at0.1.55
. - Updated
numpy
package dependency to1.19.2
. - Updated
tensorflow-addons
package dependency to0.12.0
. - Updated
tensorflow-model-optimization
package dependency to0.5.0
.
- Fixed issue with the
sequence_reduce
intrinsic handling federated types.
- New
tff.aggregators
package with interfaces for stateful aggregation compositions. - New Google Landmark Dataset
tff.simulations.dataset.gldv2
- New convenience APIs
tff.type_clients
andtff.type_at_server
- Invert control of computation tracing methods to produce clearer Python stack traces on error.
- Move executor creation to a factory pattern in executor service, allowing distributed runtimes to be agnostic to number of clients.
- Significant improvements of type serialization/deserialization
- New
tff.simulations.compose_dataset_computation_with_iterative_process
API to move execution of client dataset construction to executor stack leaves. - Extend parameterization of
tff.learning.build_federated_averaging_process
withuse_experimental_simulation_loop
argument to better utilize multi-GPU setups.
- Removed
tff.utils.StatefulFn
, replaced bytff.templates.MeasuredProcess
. - Removed
tff.learning.assign_weights_to_keras_model
- Stop removing
OptimizeDataset
ops fromtff.tf_computation
s. - The
research/
directory has been moved to http://github.com/google-research/federated. - Updates to
input_spec
argument fortff.learning.from_keras_model
. - Updated TensorFlow dependency to
2.3.0
. - Updated TensorFlow Model Optimization dependency to
0.4.0
.
- Fixed streaming mode hang in remote executor.
- Wrap
collections.namedtuple._asdict
calls incollections.OrderedDict
to support Python 3.8. - Correctly serialize/deserialize
tff.TensorType
with unknown shapes. - Cleanup TF lookup HashTable resources in TFF execution.
- Fix bug in Shakespeare dataset where OOV and last vocab character were the same.
- Fix TFF ingestion of Keras models with shared embeddings.
- Closed hole in compilation to CanonicalForm.
- "Federated Learning for Image Classification" tutorial fails to load
projector
plugin for tensorboard. (https://github.com/tensorflow/federated/issues/914) - Certain Keras models with activity regularization fail in execution with unliftable error (https://github.com/tensorflow/federated/issues/913).
This release contains contributions from many people at Google, as well as:
amitport, ronaldseoh
- Fixed issue preventing Python
list
s from beingall_equal
values.
- Mirrored user-provided types and minimize usage of
AnonymousTuple
.
- Renamed
AnonymousTuple
toStruct
.
- Updated
tensorflow-addons
package dependency to0.9.0
. - Added API to expose the native backend more conveniently. See
tff.backends.native.*
for more information. - Added a compiler argument to the
tff.framework.ExecutionContext
API and provided a compiler for the native execution environment, which improves TFF’s default concurrency pattern. - Introduced a new
tff.templates.MeasuredProcess
concept, a specialization oftff.templates.IterativeProcess
. - Extends
tff.learning
interfaces to accepttff.templates.MeasuredProcess
objects for aggregation and broadcast computations. - Introduce new convenience method
tff.learning.weights_type_from_model
. - Introduced the concept of a
tff.framework.FederatingStrategy
, which parameterizes thetff.framework.FederatingExecutor
so that the implementation of a specific intrinsic is easier to provide. - Reduced duplication in TFF’s generated ASTs.
- Enabled usage of GPUs on remote workers.
- Documentation improvements.
- The
IterativeProcess
return fromtff.learning.build_federated_averaging_process
andtff.learning.build_federated_sgd_process
now zip the second tuple output (the metrics) to change the result from a structure of federated values to to a federated structure of values. - Removed
tff.framework.set_default_executor
function, instead you should use the more convenienttff.backends.native.set_local_execution_context
function or manually construct a context an set it usingtff.framework.set_default_context
. - The
tff.Computation
base class now contains an abstract__hash__
method, to ensure compilation results can be cached. Any custom implementations of this interface should be updated accordingly.
- Fixed issue for missing variable initialization for variables explicitly not added to any collections.
- Fixed issue where table initializers were not run if the
tff.tf_computation
decorated function used no variables.
This release contains contributions from many people at Google, as well as:
jvmcns@
- Multiple TFF execution speedups.
- New
tff.templates.MeasuredProcess
specialization ofIterativeProcess
. - Increased optimization of the
tff.templates.IterativeProcess
->tff.backends.mapreduce.CanonicalForm
compiler.
- Moved
tff.utils.IterativeProcess
totff.templates.IterativeProcess
. - Removed
tff.learning.TrainableModel
, client optimizers are now arguments on thetff.learning.build_federated_averaging_process
. - Bump required version of pip packages for tensorflow (2.2), numpy (1.18), pandas (0.24), grpcio (1.29).
- Issue with GPUs in multimachine simulations not being utilized, and bug on deserializing datasets with GPU-backed runtime.
- TensorFlow lookup table initialization failures.
- In some situations, TF will attempt to push Datasets inside of tf.functions over GPU device boundaries, which fails by default. This can be hit by certain usages of TFF, e.g. as tracked here.
This release contains contributions from many people at Google, as well as:
jvmcns@
- Fixed issues in tutorial notebooks.
- Updated
absl-py
package dependency to0.9.0
. - Updated
h5py
package dependency to2.8.0
. - Updated
numpy
package dependency to1.17.5
. - Updated
tensorflow-privacy
package dependency to0.2.2
.
- Deprecated
dummy_batch
parameter of thetff.learning.from_keras_model
function.
- Fixed issues with executor service using old executor API.
- Fixed issues with remote executor test using old executor API.
- Fixed issues in tutorial notebooks.
- Upgraded tensorflow dependency from
2.0.0
to2.1.0
. - Upgraded tensorflow-addons dependency from
0.6.0
to0.7.0
. - Upgraded attr dependency from
18.2
to19.3
. - Upgraded tfmot dependency from
0.1.3
to0.2.1
. - Added a federated partition of the CIFAR-100 dataset to
tff.simulation.datasets.cifar100
. - Made the high performance, parallel executor the default (replacing the reference executor).
- Added a new
tff.learning.build_personalization_eval
for evaluating model personalization strategies. - Added new federated intrinsic
tff.federated_secure_sum
. tff.learning.build_federated_averaing_process()
now takes aclient_optimizer_fn
and atff.learning.Model
.tff.learning.TrainableModel
is now deprecated.- Improved performance in the high performance executor stack.
- Implemented and exposed
tff.framework.ExecutorFactory
; alltff.framework...executor_factory
calls now return an instance of this class. - Added
remote_executor_example
binary which demonstrates using the RemoteExecutor across multi-machine deployments. - Added
close()
method to the Executor, allowing subclasses to proactively release resources. - Updated documentation and scripts for creating Docker images of the TFF runtime.
- Automatically call
tff.federated_zip
on inputs to other federated intrinsics.
- Dropped support for Python2.
- Renamed
tff.framework.create_local_executor
(and similar methods) totff.framework.local_executor_factory
. - Deprecated
federated_apply()
, instead usefederated_map()
for all placements.
- Fixed problem with different instances of the same model having different
named types.
tff.learning.ModelWeights
no longer names the tuple fields returned for model weights, instead relying on an ordered list. tff.sequence_*
on unplaced types now correctly returns atff.Value
.
tff.sequence_*
.. operations are not implemented yet on the new high-performance executor stack.- A subset of previously-allowed lambda captures are no longer supported on the new execution stack.
- Python 2 support is now deprecated and will be removed in a future release.
federated_map
now works with bothtff.SERVER
andtff.CLIENT
placements.federated_zip
received significant performance improvements and now works recursively.- Added retry logic to gRPC calls in the execution stack.
collections.OrderedDict
is now required in many places rather than standard Python dictionaries.
- Fixed computation of the number of examples when Keras is using multiple inputs.
- Fixed an assumption that
tff.framework.Tuple
is returned fromIterativeProcess.next
. - Fixed argument packing in polymorphic invocations on the new executor API.
- Fixed support for
dir()
inValueImpl
. - Fixed a number of issues in the Colab / Jupyter notebook tutorials.
- Updated to use
grpcio
1.24.3
.
- Add a
federated_sample
aggregation that is used to collect a sample of client values on the server using reservoir sampling. - Updated to use
tensorflow
2.0.0
andtensorflow-addons
0.6.0
instead of the coorisponding nightly package in thesetup.py
for releasing TFF Python packages. - Updated to use
tensorflow-privacy
0.2.0
. - Added support for
attr.s
classes type annotations. - Updated streaming
Execute
method ontff.framework.ExecutorService
to be asynchronous. - PY2 and PY3 compatability.
- TFF is now fully compatible and dependent on TensorFlow 2.0
- Add stateful aggregation with differential privacy using TensorFlow Privacy (https://pypi.org/project/tensorflow-privacy/).
- Additional stateful aggregation lwith compression using TensorFlow Model Optimization (https://pypi.org/project/tensorflow-model-optimization/).
- Improved executor stack for simulations, documentation and scripts for starting simulations on GCP.
- New libraries for creating synthetic IID and non-IID datsets in simulation.
examples
package split tosimulation
andresearch
.
- Various error message string improvements.
- Dataset serialization fixed for V1/V2 datasets.
tff.federated_aggregate
supportsaccumulate
,merge
andreport
methods with signatures containing tensors with undefined dimensions.
- Improvements in the executor stack: caching, deduplication, bi-directional streaming mode, ability to specify physical devices.
- Components for integration with custom mapreduce backends
(
tff.backends.mapreduce
). - Improvements in simulation dataset APIs: ConcreteClientData, random seeds, stack overflow dataset, updated documentation.
- Utilities for encoding and various flavors of aggregation.
- Removed support for the deprecated
tf.data.Dataset
string iterator handle. - Bumps the required versions of grpcio and tf-nightly.
- Fixes in notebooks, typos, etc.
- Assorted fixes to align with TF 2.0.
- Fixes thread cleanup on process exit in the high-performance executor.
This release contains contributions from many people at Google, as well as:
Gui-U@, Krishna Pillutla, Sergii Khomenko.
- High-performance simulation components and tutorials.
- Refactoring/consolidation in utility functions in tff.framework.
- Switches some of the tutorials to new PY3-only executor stack components.
- Includes the
examples
directory in the pip package. - Pip installs for TensorFlow and TFF in turorials.
- Patches for asyncio in tutorials for use in Jupyter notebooks.
- Python 3 compatibility issues.
- Support for
federated_map_all_equal
in the reference executor. - Adds missing implementations of generic constants and operator intrinsics.
- Fixes missed link in compatibility section of readme.
- Adds some of the missing intrinsic reductions.
This release contains contributions from many people at Google.
- Support for multiple outputs and loss functions in
keras
models. - Support for stateful broadcast and aggregation functions in federated averaging and federated SGD APIs.
tff.utils.update_state
extended to handle more generalstate
arguments.- Addition of
tff.utils.federated_min
andtff.utils.federated_max
. - Shuffle
client_ids
increate_tf_dataset_from_all_clients
by default to aid optimization.
- Dependencies added to
requirements.txt
; in particular,grpcio
andportpicker
.
- Removes dependency on
tf.data.experimental.NestedStructure
.
This release contains contributions from many people at Google, as well as:
Dheeraj R Reddy, @Squadrick.
- Removed source level TF dependencies and switched from
tensorflow
totf-nightly
dependency. - Add support for
attr
module in TFF type system. - Introduced new
tff.framework
interface layer. - New AST transformations and optimizations.
- Preserve Python container usage in
tff.tf_computation
.
- Updated TFF model to reflect Keras
tf.keras.model.weights
order. - Keras model with multiple inputs. #416
- New
tff.simulation.TransformingClientData
API and associated inifinite EMNIST dataset (see http://tensorflow.org/federated/api_docs/python/tff for details)
- Normalized
func
tofn
across the repository (rename some parameters and functions)
- Wrapped Keras models can now be used with
tff.learning.build_federated_evaluation
- Keras models with non-trainable variables in intermediate layers (e.g.
BatchNormalization) can be assigned back to Keras models with
tff.learning.ModelWeights.assign_weights_to
- Rename
tff.learning.federated_average
totff.learning.federated_mean
. - Rename 'func' arguments to 'fn' throughout the API.
- Assorted fixes to typos in documentation and setup scripts.
- Updated to use TensorFlow version 1.13.1.
- Implemented Federated SGD in
tff.learning.build_federated_sgd_process()
.
next()
function oftff.utils.IteratedProcess
s returned bybuild_federated_*_process()
no longer unwraps single value tuples (always returns a tuple).
- Modify setup.py to require TensorFlow 1.x and not upgrade to 2.0 alpha.
- Stop unpacking single value tuples in
next()
function of objects returned bybuild_federated_*_process()
. - Clear cached Keras sessions when wrapping Keras models to avoid referencing stale graphs.
Initial public release.