diff --git a/.bazelrc b/.bazelrc index f4e56483a9..1dad6ba247 100644 --- a/.bazelrc +++ b/.bazelrc @@ -145,9 +145,6 @@ build --config=v2 build:cuda --action_env=TF_CUDA_VERSION="12" build:cuda --action_env=TF_CUDNN_VERSION="8" build:cuda --repo_env=TF_CUDA_COMPUTE_CAPABILITIES="sm_60,sm_70,sm_75,compute_80" -build:cuda --action_env=GCC_HOST_COMPILER_PATH="/dt9/usr/bin/gcc" - -build --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=1 # Default startup startup --host_jvm_args=-Dbazel.DigestFunction=SHA256 diff --git a/BUILD b/BUILD index a5657bdc6c..bbf336a8ff 100644 --- a/BUILD +++ b/BUILD @@ -1,4 +1,5 @@ load("@rules_license//rules:license.bzl", "license") +# load("@rules_python//python:pip.bzl", "compile_pip_requirements") package( default_applicable_licenses = [":package_license"], @@ -14,3 +15,13 @@ license( licenses(["notice"]) exports_files(["LICENSE"]) + +# compile_pip_requirements( +# name = "requirements", +# src = "requirements.in", +# extra_args = [ +# "--allow-unsafe", +# "--resolver=backtracking", +# ], +# requirements_txt = "requirements.txt", +# ) diff --git a/RELEASE.md b/RELEASE.md index e71076bed4..2ca9ffc1b1 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -11,6 +11,7 @@ * Moved aggregation from https://github.com/google-parfait/federated-compute to TFF to consolidate the federated language and remove circular dependencies. +* Updated to use a hermetic Python environment. ## Breaking Changes diff --git a/WORKSPACE b/WORKSPACE index 37270a7f1d..494ef348d2 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -84,7 +84,6 @@ git_repository( # TODO: b/263201501 - Make DTensor C++ API public and remove this patch. "//third_party/tensorflow:dtensor_internal_visibility.patch", "//third_party/tensorflow:internal_visibility.patch", - "//third_party/tensorflow:python_toolchain.patch", "//third_party/tensorflow:tf2xla_visibility.patch", ], remote = "https://github.com/tensorflow/tensorflow.git", @@ -141,6 +140,39 @@ git_repository( commit = "e4635f223e7d36dfbea3b722a4ca4807a7e882e2", ) +# +# Python toolchain. +# + +load("@rules_python//python:repositories.bzl", "py_repositories") + +py_repositories() + +load("@rules_python//python:repositories.bzl", "python_register_toolchains") + +python_register_toolchains( + name = "python", + ignore_root_user_error = True, + python_version = "3.11", +) + +# +# Python dependencies. +# + +load("@python//:defs.bzl", "interpreter") +load("@rules_python//python:pip.bzl", "pip_parse") + +pip_parse( + name = "pypi", + python_interpreter_target = interpreter, + requirements_lock = "//:requirements.txt", +) + +load("@pypi//:requirements.bzl", "install_deps") + +install_deps() + # # Transitive dependencies, grouped by direct dependency. # diff --git a/examples/datasets/BUILD b/examples/datasets/BUILD index b5269d917d..6f5aa86578 100644 --- a/examples/datasets/BUILD +++ b/examples/datasets/BUILD @@ -10,5 +10,8 @@ licenses(["notice"]) py_binary( name = "load_flair", srcs = ["load_flair.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_absl_py//:pkg", + ], ) diff --git a/examples/learning/federated_program/vizier/BUILD b/examples/learning/federated_program/vizier/BUILD index 517888071a..384451b873 100644 --- a/examples/learning/federated_program/vizier/BUILD +++ b/examples/learning/federated_program/vizier/BUILD @@ -3,13 +3,19 @@ load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test") py_library( name = "data_sources", srcs = ["data_sources.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "learning_process", srcs = ["learning_process.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_tensorflow//:pkg", + ], ) py_binary( @@ -23,12 +29,15 @@ py_binary( ":learning_process", ":vizier_service", "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_google_vizier//:pkg", ], ) py_library( name = "vizier_service", srcs = ["vizier_service.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_test( @@ -37,5 +46,8 @@ py_test( data = [ ":study_spec.textproto", ], - deps = [":vizier_service"], + deps = [ + ":vizier_service", + "@pypi_absl_py//:pkg", + ], ) diff --git a/examples/personalization/BUILD b/examples/personalization/BUILD index 79b03a8d71..1dd2f4172c 100644 --- a/examples/personalization/BUILD +++ b/examples/personalization/BUILD @@ -10,7 +10,10 @@ licenses(["notice"]) py_library( name = "p13n_utils", srcs = ["p13n_utils.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -19,6 +22,8 @@ py_test( deps = [ ":p13n_utils", "//tensorflow_federated", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -28,5 +33,8 @@ py_binary( deps = [ ":p13n_utils", "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/examples/program/BUILD b/examples/program/BUILD index 7bd07db1c7..327e74b00a 100644 --- a/examples/program/BUILD +++ b/examples/program/BUILD @@ -10,7 +10,11 @@ licenses(["notice"]) py_library( name = "computations", srcs = ["computations.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -26,6 +30,8 @@ py_binary( ":computations", ":program_logic", "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -36,5 +42,8 @@ py_test( ":computations", ":program_logic", "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/examples/simple_fedavg/BUILD b/examples/simple_fedavg/BUILD index 254ba882b2..c560160b36 100644 --- a/examples/simple_fedavg/BUILD +++ b/examples/simple_fedavg/BUILD @@ -14,13 +14,21 @@ py_binary( deps = [ ":simple_fedavg_tff", "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "simple_fedavg_tf", srcs = ["simple_fedavg_tf.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -29,6 +37,7 @@ py_library( deps = [ ":simple_fedavg_tf", "//tensorflow_federated", + "@pypi_tensorflow//:pkg", ], ) @@ -42,5 +51,9 @@ py_cpu_gpu_test( ":simple_fedavg_tf", ":simple_fedavg_tff", "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/examples/stateful_clients/BUILD b/examples/stateful_clients/BUILD index 05cc2bb269..fabeae1ff3 100644 --- a/examples/stateful_clients/BUILD +++ b/examples/stateful_clients/BUILD @@ -14,13 +14,20 @@ py_binary( ":stateful_fedavg_tf", ":stateful_fedavg_tff", "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "stateful_fedavg_tf", srcs = ["stateful_fedavg_tf.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_attrs//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -29,6 +36,8 @@ py_library( deps = [ ":stateful_fedavg_tf", "//tensorflow_federated", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -40,5 +49,8 @@ py_test( ":stateful_fedavg_tf", ":stateful_fedavg_tff", "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000000..2baf1d57f2 --- /dev/null +++ b/requirements.in @@ -0,0 +1,53 @@ +# Requirements for the TensorFlow Federated development environment. +# +# If you add a *new* dependency and it is required by the TensorFlow Federated +# package, also add the dependency to +# https://github.com/tensorflow/federated/blob/main/tensorflow_federated/tools/development/setup.py. +# +# If you update the version of an *existing* dependency and it is required by +# the TensorFlow Federated package, also update the version of the dependency in +# https://github.com/tensorflow/federated/blob/main/tensorflow_federated/tools/development/setup.py. +# +# * For packages that have a stable release, we use a version that is +# compatible with that release (e.g. `~=x.y`). See +# https://peps.python.org/pep-0440/#compatible-release for more information. +# * For packages that do not have a stable release, we use a version that +# matches a release that has been tested (e.g. `==x.y.z`). See +# https://peps.python.org/pep-0440/#version-matching for more information. +# +# Note: There is bug in `pip` when multiple packages use the compatible release +# operator `~=` to specify a version and one of those versions ends in `0`. See +# https://github.com/pypa/pip/issues/9613 for more information. In this case, +# use the equivalent clause `>=x.0,==x.*` instead of `~=x.0`. +# +# This assumes that the packages follows Semantic Versioning, see +# https://semver.org/. If a package follows a different versioning scheme or +# requires unique handling, we use a different version specifier and comment the +# versioning scheme or reasoning. + +absl-py>=1.0,==1.* +attrs~=23.1 +cachetools~=5.3 +dm-tree==0.1.8 +dp-accounting==0.4.3 +#farmhashpy==0.4.0 +google-vizier==0.1.11 +grpcio~=1.46 +jaxlib==0.4.14 +jax==0.4.14 +numpy~=1.25 +portpicker~=1.6 +scipy~=1.9.3 +semantic-version~=2.6 +tensorflow-model-optimization==0.7.5 +tensorflow-privacy==0.9.0 +tqdm~=4.64 +typing-extensions>=4.5.0,==4.5.* + +# The version of this dependency should match the version in +# https://github.com/tensorflow/federated/blob/main/WORKSPACE. +tensorflow>=2.14.0,==2.14.* + +# TODO: b/315515548 - Required because current dependencies are pulling in later +# versions which are causing opaque failures. +googleapis-common-protos==1.61.0 diff --git a/requirements.txt b/requirements.txt index 86ea4b8702..c336fe3818 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,53 +1,225 @@ -# Requirements for the TensorFlow Federated development environment. # -# If you add a *new* dependency and it is required by the TensorFlow Federated -# package, also add the dependency to -# https://github.com/tensorflow/federated/blob/main/tensorflow_federated/tools/development/setup.py. +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: # -# If you update the version of an *existing* dependency and it is required by -# the TensorFlow Federated package, also update the version of the dependency in -# https://github.com/tensorflow/federated/blob/main/tensorflow_federated/tools/development/setup.py. +# pip-compile --allow-unsafe tensorflow_federated/requirements.in # -# * For packages that have a stable release, we use a version that is -# compatible with that release (e.g. `~=x.y`). See -# https://peps.python.org/pep-0440/#compatible-release for more information. -# * For packages that do not have a stable release, we use a version that -# matches a release that has been tested (e.g. `==x.y.z`). See -# https://peps.python.org/pep-0440/#version-matching for more information. -# -# Note: There is bug in `pip` when multiple packages use the compatible release -# operator `~=` to specify a version and one of those versions ends in `0`. See -# https://github.com/pypa/pip/issues/9613 for more information. In this case, -# use the equivalent clause `>=x.0,==x.*` instead of `~=x.0`. -# -# This assumes that the packages follows Semantic Versioning, see -# https://semver.org/. If a package follows a different versioning scheme or -# requires unique handling, we use a different version specifier and comment the -# versioning scheme or reasoning. - -absl-py>=1.0,==1.* -attrs~=23.1 -cachetools~=5.3 +absl-py==1.4.0 + # via + # -r tensorflow_federated/requirements.in + # dp-accounting + # google-vizier + # tensorboard + # tensorflow + # tensorflow-model-optimization + # tensorflow-privacy + # tensorflow-probability +astunparse==1.6.3 + # via tensorflow +attrs==23.1.0 + # via + # -r tensorflow_federated/requirements.in + # dp-accounting + # google-vizier +cachetools==5.3.3 + # via + # -r tensorflow_federated/requirements.in + # google-auth +certifi==2024.2.2 + # via requests +charset-normalizer==3.3.2 + # via requests +cloudpickle==3.0.0 + # via tensorflow-probability +decorator==5.1.1 + # via tensorflow-probability dm-tree==0.1.8 + # via + # -r tensorflow_federated/requirements.in + # dp-accounting + # tensorflow-model-optimization + # tensorflow-privacy + # tensorflow-probability dp-accounting==0.4.3 -farmhashpy==0.4.0 + # via + # -r tensorflow_federated/requirements.in + # tensorflow-privacy +#farmhashpy==0.4.0 + # via -r tensorflow_federated/requirements.in +flatbuffers==24.3.25 + # via tensorflow +gast==0.5.4 + # via + # tensorflow + # tensorflow-probability +google-auth==2.29.0 + # via + # google-auth-oauthlib + # tensorboard +google-auth-oauthlib==1.0.0 + # via tensorboard +google-pasta==0.2.0 + # via tensorflow google-vizier==0.1.11 -grpcio~=1.46 -jaxlib==0.4.14 + # via -r tensorflow_federated/requirements.in +googleapis-common-protos==1.61.0 + # via + # -r tensorflow_federated/requirements.in + # google-vizier +greenlet==3.0.3 + # via sqlalchemy +grpcio==1.63.0 + # via + # -r tensorflow_federated/requirements.in + # google-vizier + # grpcio-tools + # tensorboard + # tensorflow +grpcio-tools==1.62.2 + # via google-vizier +h5py==3.11.0 + # via tensorflow +idna==3.7 + # via requests jax==0.4.14 -numpy~=1.25 -portpicker~=1.6 -scipy~=1.9.3 -semantic-version~=2.6 + # via -r tensorflow_federated/requirements.in +jaxlib==0.4.14 + # via -r tensorflow_federated/requirements.in +joblib==1.4.2 + # via scikit-learn +keras==2.14.0 + # via tensorflow +libclang==18.1.1 + # via tensorflow +markdown==3.6 + # via tensorboard +markupsafe==2.1.5 + # via werkzeug +ml-dtypes==0.2.0 + # via + # jax + # jaxlib + # tensorflow +mpmath==1.3.0 + # via dp-accounting +numpy==1.25.2 + # via + # -r tensorflow_federated/requirements.in + # dp-accounting + # google-vizier + # h5py + # jax + # jaxlib + # ml-dtypes + # opt-einsum + # scikit-learn + # scipy + # tensorboard + # tensorflow + # tensorflow-model-optimization + # tensorflow-privacy + # tensorflow-probability +oauthlib==3.2.2 + # via requests-oauthlib +opt-einsum==3.3.0 + # via + # jax + # tensorflow +packaging==22.0 + # via + # tensorflow + # tensorflow-privacy +portpicker==1.6.0 + # via + # -r tensorflow_federated/requirements.in + # google-vizier +protobuf==4.25.3 + # via + # google-vizier + # googleapis-common-protos + # grpcio-tools + # tensorboard + # tensorflow +psutil==5.9.8 + # via portpicker +pyasn1==0.6.0 + # via + # pyasn1-modules + # rsa +pyasn1-modules==0.4.0 + # via google-auth +requests==2.31.0 + # via + # requests-oauthlib + # tensorboard +requests-oauthlib==2.0.0 + # via google-auth-oauthlib +rsa==4.9 + # via google-auth +scikit-learn==1.4.2 + # via tensorflow-privacy +scipy==1.9.3 + # via + # -r tensorflow_federated/requirements.in + # dp-accounting + # jax + # jaxlib + # scikit-learn + # tensorflow-privacy +semantic-version==2.10.0 + # via -r tensorflow_federated/requirements.in +six==1.16.0 + # via + # astunparse + # google-pasta + # tensorboard + # tensorflow + # tensorflow-model-optimization + # tensorflow-probability +sqlalchemy==1.4.20 + # via google-vizier +tensorboard==2.14.1 + # via tensorflow +tensorboard-data-server==0.7.2 + # via tensorboard +tensorflow==2.14.1 + # via + # -r tensorflow_federated/requirements.in + # tensorflow-privacy +tensorflow-estimator==2.14.0 + # via + # tensorflow + # tensorflow-privacy +tensorflow-io-gcs-filesystem==0.37.0 + # via tensorflow tensorflow-model-optimization==0.7.5 + # via -r tensorflow_federated/requirements.in tensorflow-privacy==0.9.0 -tqdm~=4.64 -typing-extensions>=4.5.0,==4.5.* + # via -r tensorflow_federated/requirements.in +tensorflow-probability==0.22.1 + # via tensorflow-privacy +termcolor==2.4.0 + # via tensorflow +threadpoolctl==3.5.0 + # via scikit-learn +tqdm==4.66.4 + # via -r tensorflow_federated/requirements.in +typing-extensions==4.5.0 + # via + # -r tensorflow_federated/requirements.in + # tensorflow +urllib3==2.2.1 + # via requests +werkzeug==3.0.3 + # via tensorboard +wheel==0.43.0 + # via astunparse +wrapt==1.14.1 + # via tensorflow -# The version of this dependency should match the version in -# https://github.com/tensorflow/federated/blob/main/WORKSPACE. -tensorflow>=2.14.0,==2.14.* - -# TODO: b/315515548 - Required because current dependencies are pulling in later -# versions which are causing opaque failures. -googleapis-common-protos==1.61.0 +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.5.1 + # via + # grpcio-tools + # tensorboard + # tensorflow diff --git a/tensorflow_federated/cc/core/impl/aggregation/tensorflow/python/BUILD b/tensorflow_federated/cc/core/impl/aggregation/tensorflow/python/BUILD index d8c21e4729..03b44649f9 100644 --- a/tensorflow_federated/cc/core/impl/aggregation/tensorflow/python/BUILD +++ b/tensorflow_federated/cc/core/impl/aggregation/tensorflow/python/BUILD @@ -53,5 +53,7 @@ py_test( "//tensorflow_federated/cc/core/impl/aggregation/core:tensor_py_pb2", "//tensorflow_federated/cc/core/impl/aggregation/protocol:aggregation_protocol_messages_py_pb2", "//tensorflow_federated/cc/core/impl/aggregation/protocol:configuration_py_pb2", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/cc/core/impl/executors/BUILD b/tensorflow_federated/cc/core/impl/executors/BUILD index 5301603703..cfd17e459a 100644 --- a/tensorflow_federated/cc/core/impl/executors/BUILD +++ b/tensorflow_federated/cc/core/impl/executors/BUILD @@ -617,6 +617,10 @@ py_binary( name = "make_reduce_lambda_test_graph", testonly = True, srcs = ["make_reduce_lambda_test_graph.py"], + deps = [ + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) genrule( @@ -634,6 +638,10 @@ py_binary( name = "make_structural_reduce_test_graph", testonly = True, srcs = ["make_structural_reduce_test_graph.py"], + deps = [ + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) cc_library( diff --git a/tensorflow_federated/python/aggregators/BUILD b/tensorflow_federated/python/aggregators/BUILD index c10987217d..211d010b80 100644 --- a/tensorflow_federated/python/aggregators/BUILD +++ b/tensorflow_federated/python/aggregators/BUILD @@ -55,6 +55,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_tensorflow//:pkg", ], ) @@ -70,6 +71,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -89,6 +93,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_tensorflow//:pkg", ], ) @@ -105,6 +110,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:type_test_utils", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -123,6 +131,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -142,6 +152,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:type_test_utils", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -160,6 +173,10 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_dp_accounting//:pkg", + "@pypi_tensorflow//:pkg", + "@pypi_tensorflow_privacy//:pkg", ], ) @@ -177,6 +194,10 @@ py_test( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + "@pypi_tensorflow_privacy//:pkg", ], ) @@ -194,6 +215,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -209,6 +232,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:type_test_utils", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -235,6 +261,9 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + "@pypi_tensorflow_privacy//:pkg", ], ) @@ -258,6 +287,10 @@ py_test( "//tensorflow_federated/python/core/templates:estimation_process", "//tensorflow_federated/python/core/templates:measured_process", "//tensorflow_federated/python/core/test:static_assert", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + "@pypi_tensorflow_privacy//:pkg", ], ) @@ -276,6 +309,9 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_dm_tree//:pkg", + "@pypi_tensorflow//:pkg", + "@pypi_tensorflow_model_optimization//:pkg", ], ) @@ -291,6 +327,10 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + "@pypi_tensorflow_model_optimization//:pkg", ], ) @@ -326,18 +366,26 @@ py_test( ":sum_factory", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "hadamard", srcs = ["hadamard.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_test( name = "hadamard_test", srcs = ["hadamard_test.py"], - deps = [":hadamard"], + deps = [ + ":hadamard", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -355,6 +403,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_analysis", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -371,6 +421,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -402,6 +455,8 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -421,6 +476,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_tensorflow//:pkg", ], ) @@ -435,6 +491,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -450,6 +509,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_conversions", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -465,6 +526,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/test:static_assert", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -482,6 +546,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:estimation_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow_privacy//:pkg", ], ) @@ -495,6 +561,10 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:estimation_process", "//tensorflow_federated/python/core/test:static_assert", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + "@pypi_tensorflow_privacy//:pkg", ], ) @@ -515,6 +585,8 @@ py_library( "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:estimation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -536,6 +608,9 @@ py_test( "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:estimation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -556,6 +631,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -573,6 +650,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:type_test_utils", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -593,6 +673,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_transformations", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -605,6 +687,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -625,6 +710,8 @@ py_library( "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:estimation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -645,6 +732,9 @@ py_test( "//tensorflow_federated/python/core/templates:estimation_process", "//tensorflow_federated/python/core/templates:measured_process", "//tensorflow_federated/python/core/test:static_assert", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -663,6 +753,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -682,6 +774,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:type_test_utils", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -712,5 +807,8 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/analytics/BUILD b/tensorflow_federated/python/analytics/BUILD index cefb441c82..a5e68de2dd 100644 --- a/tensorflow_federated/python/analytics/BUILD +++ b/tensorflow_federated/python/analytics/BUILD @@ -39,7 +39,10 @@ py_library( py_library( name = "data_processing", srcs = ["data_processing.py"], - deps = ["//tensorflow_federated/python/common_libs:py_typecheck"], + deps = [ + "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -48,6 +51,8 @@ py_test( deps = [ ":data_processing", ":histogram_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -55,11 +60,13 @@ py_library( name = "histogram_test_utils", testonly = True, srcs = ["histogram_test_utils.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_library( name = "histogram_processing", srcs = ["histogram_processing.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_test( @@ -68,6 +75,8 @@ py_test( deps = [ ":histogram_processing", ":histogram_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -86,13 +95,18 @@ py_library( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_test( name = "differential_privacy_test", srcs = ["differential_privacy_test.py"], - deps = [":differential_privacy"], + deps = [ + ":differential_privacy", + "@pypi_absl_py//:pkg", + ], ) py_test( @@ -102,5 +116,8 @@ py_test( ":count_distinct", "//tensorflow_federated/python/core/backends/test:execution_contexts", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/analytics/heavy_hitters/iblt/BUILD b/tensorflow_federated/python/analytics/heavy_hitters/iblt/BUILD index cfa7763f1c..bf5d633b9f 100644 --- a/tensorflow_federated/python/analytics/heavy_hitters/iblt/BUILD +++ b/tensorflow_federated/python/analytics/heavy_hitters/iblt/BUILD @@ -45,6 +45,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:aggregation_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -56,6 +58,9 @@ py_test( ":iblt_factory", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -67,6 +72,7 @@ py_library( deps = [ ":chunkers", ":hyperedge_hashers", + "@pypi_tensorflow//:pkg", ], ) @@ -75,7 +81,13 @@ py_library( srcs = [ "chunkers.py", ], - deps = ["//tensorflow_federated/python/common_libs:py_typecheck"], + deps = [ + "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + "@pypi_tensorflow_model_optimization//:pkg", + ], ) py_library( @@ -83,6 +95,11 @@ py_library( srcs = [ "hyperedge_hashers.py", ], + deps = [ + "@pypi_farmhashpy//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -91,20 +108,35 @@ py_test( timeout = "long", srcs = ["iblt_lib_test.py"], shard_count = 4, - deps = [":iblt_lib"], + deps = [ + ":iblt_lib", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "chunkers_test", srcs = ["chunkers_test.py"], - deps = [":chunkers"], + deps = [ + ":chunkers", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "hyperedge_hashers_test", size = "medium", srcs = ["hyperedge_hashers_test.py"], - deps = [":hyperedge_hashers"], + deps = [ + ":hyperedge_hashers", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -121,6 +153,9 @@ py_library( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -136,6 +171,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -145,6 +183,8 @@ py_library( deps = [ ":chunkers", ":iblt_lib", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -154,6 +194,8 @@ py_test( deps = [ ":iblt_lib", ":iblt_tensor", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -173,6 +215,9 @@ py_library( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -187,13 +232,20 @@ py_test( "//tensorflow_federated/python/aggregators:sum_factory", "//tensorflow_federated/python/core/backends/test:execution_contexts", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "subsample_process", srcs = ["subsample_process.py"], - deps = [":iblt_factory"], + deps = [ + ":iblt_factory", + "@pypi_scipy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -203,5 +255,8 @@ py_test( ":iblt_factory", ":iblt_lib", ":subsample_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/analytics/hierarchical_histogram/BUILD b/tensorflow_federated/python/analytics/hierarchical_histogram/BUILD index 600e238644..3f5eb1aafb 100644 --- a/tensorflow_federated/python/analytics/hierarchical_histogram/BUILD +++ b/tensorflow_federated/python/analytics/hierarchical_histogram/BUILD @@ -32,6 +32,7 @@ py_library( "//tensorflow_federated/python/aggregators:differential_privacy", "//tensorflow_federated/python/aggregators:secure", "//tensorflow_federated/python/aggregators:sum_factory", + "@pypi_tensorflow_privacy//:pkg", ], ) @@ -50,6 +51,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -65,6 +69,9 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:iterative_process", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -76,13 +83,20 @@ py_test( ":hierarchical_histogram_lib", "//tensorflow_federated/python/core/backends/test:execution_contexts", "//tensorflow_federated/python/core/test:static_assert", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "hierarchical_histogram_decoder", srcs = ["hierarchical_histogram_decoder.py"], - deps = [":build_tree_from_leaf"], + deps = [ + ":build_tree_from_leaf", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -91,18 +105,26 @@ py_test( deps = [ ":build_tree_from_leaf", ":hierarchical_histogram_decoder", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "build_tree_from_leaf", srcs = ["build_tree_from_leaf.py"], + deps = ["@pypi_numpy//:pkg"], ) py_test( name = "build_tree_from_leaf_test", srcs = ["build_tree_from_leaf_test.py"], - deps = [":build_tree_from_leaf"], + deps = [ + ":build_tree_from_leaf", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -118,6 +140,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_analysis", "//tensorflow_federated/python/core/templates:aggregation_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -132,5 +156,8 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/common_libs/BUILD b/tensorflow_federated/python/common_libs/BUILD index 7bf6e846af..55a0b96a3f 100644 --- a/tensorflow_federated/python/common_libs/BUILD +++ b/tensorflow_federated/python/common_libs/BUILD @@ -33,7 +33,10 @@ py_library( py_test( name = "async_utils_test", srcs = ["async_utils_test.py"], - deps = [":async_utils"], + deps = [ + ":async_utils", + "@pypi_absl_py//:pkg", + ], ) py_library( @@ -44,13 +47,17 @@ py_library( py_test( name = "deprecation_test", srcs = ["deprecation_test.py"], - deps = [":deprecation"], + deps = [ + ":deprecation", + "@pypi_absl_py//:pkg", + ], ) py_library( name = "golden", testonly = True, srcs = ["golden.py"], + deps = ["@pypi_absl_py//:pkg"], ) py_test( @@ -70,19 +77,29 @@ py_test( "golden_test_goldens/test_check_string_succeeds.expected", "golden_test_goldens/test_check_string_updates.expected", ], - deps = [":golden"], + deps = [ + ":golden", + "@pypi_absl_py//:pkg", + ], ) py_library( name = "py_typecheck", srcs = ["py_typecheck.py"], + deps = [ + "@pypi_attrs//:pkg", + "@pypi_typing_extensions//:pkg", + ], ) py_test( name = "py_typecheck_test", size = "small", srcs = ["py_typecheck_test.py"], - deps = [":py_typecheck"], + deps = [ + ":py_typecheck", + "@pypi_absl_py//:pkg", + ], ) py_library( @@ -97,7 +114,10 @@ py_test( name = "retrying_test", size = "small", srcs = ["retrying_test.py"], - deps = [":retrying"], + deps = [ + ":retrying", + "@pypi_absl_py//:pkg", + ], ) py_library( @@ -108,25 +128,39 @@ py_library( py_library( name = "structure", srcs = ["structure.py"], - deps = [":py_typecheck"], + deps = [ + ":py_typecheck", + "@pypi_attrs//:pkg", + "@pypi_dm_tree//:pkg", + ], ) py_test( name = "structure_test", size = "small", srcs = ["structure_test.py"], - deps = [":structure"], + deps = [ + ":structure", + "@pypi_absl_py//:pkg", + "@pypi_attrs//:pkg", + ], ) py_library( name = "tracing", srcs = ["tracing.py"], - deps = [":py_typecheck"], + deps = [ + ":py_typecheck", + "@pypi_absl_py//:pkg", + ], ) py_test( name = "tracing_test", size = "small", srcs = ["tracing_test.py"], - deps = [":tracing"], + deps = [ + ":tracing", + "@pypi_absl_py//:pkg", + ], ) diff --git a/tensorflow_federated/python/core/backends/mapreduce/BUILD b/tensorflow_federated/python/core/backends/mapreduce/BUILD index 8a5eb60425..362cfa98e7 100644 --- a/tensorflow_federated/python/core/backends/mapreduce/BUILD +++ b/tensorflow_federated/python/core/backends/mapreduce/BUILD @@ -48,6 +48,8 @@ py_library( "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_analysis", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -76,6 +78,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_serialization", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -108,6 +113,9 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -134,6 +142,7 @@ py_library( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_tensorflow//:pkg", ], ) @@ -160,6 +169,10 @@ py_test( "//tensorflow_federated/python/core/impl/types:type_test_utils", "//tensorflow_federated/python/core/templates:iterative_process", "//tensorflow_federated/python/tensorflow_libs:serialization_utils", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -179,6 +192,8 @@ py_library( "//tensorflow_federated/python/core/impl/federated_context:value_impl", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -198,5 +213,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:iterative_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/core/backends/native/BUILD b/tensorflow_federated/python/core/backends/native/BUILD index 9f7fec2635..90177bca2e 100644 --- a/tensorflow_federated/python/core/backends/native/BUILD +++ b/tensorflow_federated/python/core/backends/native/BUILD @@ -41,6 +41,8 @@ py_library( "//tensorflow_federated/python/core/impl/compiler:building_blocks", "//tensorflow_federated/python/core/impl/compiler:transformations", "//tensorflow_federated/python/core/impl/computation:computation_impl", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -55,6 +57,8 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -73,6 +77,7 @@ py_library( "//tensorflow_federated/python/core/impl/executor_stacks:cpp_executor_factory", "//tensorflow_federated/python/core/impl/executors:executor_bindings", "//tensorflow_federated/python/core/impl/executors:executor_factory", + "@pypi_tensorflow//:pkg", ], ) @@ -94,6 +99,9 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -122,6 +130,9 @@ py_test( "//tensorflow_federated/python/core/impl/computation:computation_impl", "//tensorflow_federated/python/core/impl/executors:remote_executor_grpc_stub", "//tensorflow_federated/python/tensorflow_libs:tensorflow_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -161,5 +172,7 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/backends/test/BUILD b/tensorflow_federated/python/core/backends/test/BUILD index 2c1ee81ee9..4e0332585a 100644 --- a/tensorflow_federated/python/core/backends/test/BUILD +++ b/tensorflow_federated/python/core/backends/test/BUILD @@ -52,6 +52,8 @@ py_library( "//tensorflow_federated/python/core/impl/execution_contexts:sync_execution_context", "//tensorflow_federated/python/core/impl/executor_stacks:cpp_executor_factory", "//tensorflow_federated/python/core/impl/executors:executor_bindings", + "@pypi_absl_py//:pkg", + "@pypi_portpicker//:pkg", ], ) @@ -70,6 +72,9 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -95,5 +100,7 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/backends/xla/BUILD b/tensorflow_federated/python/core/backends/xla/BUILD index 488afec6c2..7cf62b5bcf 100644 --- a/tensorflow_federated/python/core/backends/xla/BUILD +++ b/tensorflow_federated/python/core/backends/xla/BUILD @@ -53,5 +53,7 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/environments/jax_frontend/BUILD b/tensorflow_federated/python/core/environments/jax_frontend/BUILD index 3add889d5a..1a5bb7e8e8 100644 --- a/tensorflow_federated/python/core/environments/jax_frontend/BUILD +++ b/tensorflow_federated/python/core/environments/jax_frontend/BUILD @@ -33,6 +33,8 @@ py_library( "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_analysis", + "//third_party/jax", + "@pypi_numpy//:pkg", ], ) @@ -45,6 +47,9 @@ py_test( "//tensorflow_federated/python/core/impl/computation:computation_impl", "//tensorflow_federated/python/core/impl/computation:polymorphic_computation", "//tensorflow_federated/python/core/impl/types:computation_types", + "//third_party/jax", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -61,6 +66,8 @@ py_test( deps = [ ":jax_computation", ":jax_computation_context", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -79,6 +86,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_analysis", "//tensorflow_federated/python/core/impl/types:typed_object", + "//third_party/jax", + "@pypi_numpy//:pkg", ], ) @@ -95,5 +104,8 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_serialization", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "//third_party/jax", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/environments/tensorflow_backend/BUILD b/tensorflow_federated/python/core/environments/tensorflow_backend/BUILD index d24c138a86..179b318a1b 100644 --- a/tensorflow_federated/python/core/environments/tensorflow_backend/BUILD +++ b/tensorflow_federated/python/core/environments/tensorflow_backend/BUILD @@ -51,6 +51,9 @@ py_test( "//tensorflow_federated/python/core/impl/compiler:tensorflow_computation_factory", "//tensorflow_federated/python/core/impl/compiler:tensorflow_computation_test_utils", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -82,6 +85,8 @@ py_test( "//tensorflow_federated/python/core/impl/compiler:tensorflow_computation_test_utils", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -92,6 +97,7 @@ py_library( "//tensorflow_federated/proto/v0:computation_py_pb2", "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/tensorflow_libs:serialization_utils", + "@pypi_tensorflow//:pkg", ], ) @@ -108,6 +114,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:type_serialization", "//tensorflow_federated/python/core/impl/utils:tensorflow_utils", "//tensorflow_federated/python/tensorflow_libs:serialization_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -117,7 +126,10 @@ py_library( tags = [ "nokokoro", # b/193543632: C++ execution is not fully supported in OSS. ], - deps = ["//tensorflow_federated/cc/core/impl/executors:executor_bindings"], + deps = [ + "//tensorflow_federated/cc/core/impl/executors:executor_bindings", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -136,6 +148,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -155,6 +170,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_analysis", "//tensorflow_federated/python/core/impl/types:type_conversions", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -169,5 +186,7 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/environments/tensorflow_frontend/BUILD b/tensorflow_federated/python/core/environments/tensorflow_frontend/BUILD index 08e0ee4907..5404e0755d 100644 --- a/tensorflow_federated/python/core/environments/tensorflow_frontend/BUILD +++ b/tensorflow_federated/python/core/environments/tensorflow_frontend/BUILD @@ -35,6 +35,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_analysis", "//tensorflow_federated/python/core/impl/types:type_conversions", + "@pypi_dm_tree//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -49,6 +51,9 @@ py_test( "//tensorflow_federated/python/core/impl/context_stack:runtime_error_context", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -64,6 +69,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/impl/utils:tensorflow_utils", + "@pypi_dm_tree//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -79,6 +86,9 @@ py_test( "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_serialization", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -96,6 +106,7 @@ py_library( "//tensorflow_federated/python/core/impl/utils:tensorflow_utils", "//tensorflow_federated/python/tensorflow_libs:serialization_utils", "//tensorflow_federated/python/tensorflow_libs:variable_utils", + "@pypi_tensorflow//:pkg", ], ) @@ -110,5 +121,8 @@ py_test( "//tensorflow_federated/python/core/impl/types:type_serialization", "//tensorflow_federated/python/tensorflow_libs:serialization_utils", "//tensorflow_federated/python/tensorflow_libs:tensorflow_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/core/environments/xla_backend/BUILD b/tensorflow_federated/python/core/environments/xla_backend/BUILD index f8f0ba8c99..0b41838025 100644 --- a/tensorflow_federated/python/core/environments/xla_backend/BUILD +++ b/tensorflow_federated/python/core/environments/xla_backend/BUILD @@ -33,6 +33,8 @@ py_library( "//tensorflow_federated/python/core/impl/compiler:local_computation_factory_base", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_analysis", + "//third_party/jax", + "@pypi_numpy//:pkg", ], ) @@ -45,6 +47,9 @@ py_test( ":runtime", "//tensorflow_federated/proto/v0:computation_py_pb2", "//tensorflow_federated/python/core/impl/types:computation_types", + "//third_party/jax", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -60,6 +65,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_analysis", "//tensorflow_federated/python/core/impl/types:typed_object", + "//third_party/jax", + "@pypi_numpy//:pkg", ], ) @@ -71,6 +78,9 @@ py_test( ":xla_serialization", "//tensorflow_federated/python/common_libs:structure", "//tensorflow_federated/python/core/impl/types:computation_types", + "//third_party/jax", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -80,7 +90,10 @@ py_library( tags = [ "nokokoro", # b/193543632: C++ execution is not fully supported in OSS. ], - deps = ["//tensorflow_federated/cc/core/impl/executors:executor_bindings"], + deps = [ + "//tensorflow_federated/cc/core/impl/executors:executor_bindings", + "@pypi_tensorflow//:pkg", # TODO: b/305743962 - Remove the tensorflow dependency. + ], ) py_test( @@ -89,7 +102,10 @@ py_test( tags = [ "nokokoro", # b/193543632: C++ execution is not fully supported in OSS. ], - deps = [":xla_executor_bindings"], + deps = [ + ":xla_executor_bindings", + "@pypi_absl_py//:pkg", + ], ) py_library( @@ -101,7 +117,9 @@ py_library( "//tensorflow_federated/python/common_libs:structure", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_serialization", + "//third_party/jax", "@com_google_protobuf//:protobuf_python", + "@pypi_numpy//:pkg", ], ) @@ -114,6 +132,9 @@ py_test( "//tensorflow_federated/proto/v0:computation_py_pb2", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_serialization", + "//third_party/jax", "@com_google_protobuf//:protobuf_python", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/impl/compiler/BUILD b/tensorflow_federated/python/core/impl/compiler/BUILD index da5140a598..419b26c08c 100644 --- a/tensorflow_federated/python/core/impl/compiler/BUILD +++ b/tensorflow_federated/python/core/impl/compiler/BUILD @@ -33,6 +33,7 @@ py_library( "//tensorflow_federated/proto/v0:array_py_pb2", "//tensorflow_federated/python/core/impl/types:array_shape", "//tensorflow_federated/python/core/impl/types:dtype_utils", + "@pypi_numpy//:pkg", ], ) @@ -43,6 +44,8 @@ py_test( ":array", "//tensorflow_federated/proto/v0:array_py_pb2", "//tensorflow_federated/proto/v0:data_type_py_pb2", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -66,6 +69,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/impl/types:type_transformations", + "@pypi_tensorflow//:pkg", ], ) @@ -127,6 +131,8 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_analysis", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -141,6 +147,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "@com_google_protobuf//:protobuf_python", + "@pypi_numpy//:pkg", ], ) @@ -159,6 +166,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_serialization", "//tensorflow_federated/python/core/impl/types:typed_object", "@com_google_protobuf//:protobuf_python", + "@pypi_numpy//:pkg", ], ) @@ -180,6 +188,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_serialization", "@com_google_protobuf//:protobuf_python", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -203,6 +214,8 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_factory", "//tensorflow_federated/python/core/impl/types:type_serialization", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -214,6 +227,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_factory", + "@pypi_numpy//:pkg", ], ) @@ -221,7 +235,10 @@ py_test( name = "intrinsic_defs_test", size = "small", srcs = ["intrinsic_defs_test.py"], - deps = [":intrinsic_defs"], + deps = [ + ":intrinsic_defs", + "@pypi_absl_py//:pkg", + ], ) py_library( @@ -249,6 +266,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_transformations", "//tensorflow_federated/python/core/impl/utils:tensorflow_utils", "//tensorflow_federated/python/tensorflow_libs:serialization_utils", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -264,6 +283,9 @@ py_cpu_gpu_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_factory", "//tensorflow_federated/python/core/impl/types:type_serialization", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -277,6 +299,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_serialization", "//tensorflow_federated/python/core/impl/utils:tensorflow_utils", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -293,6 +317,7 @@ py_library( "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/common_libs:structure", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_attrs//:pkg", ], ) @@ -314,6 +339,8 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_analysis", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -340,6 +367,8 @@ py_test( "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -369,6 +398,8 @@ py_test( ":tree_analysis", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -414,6 +445,8 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -443,5 +476,6 @@ py_test( deps = [ ":building_block_test_utils", ":compiler_test_utils", + "@pypi_absl_py//:pkg", ], ) diff --git a/tensorflow_federated/python/core/impl/computation/BUILD b/tensorflow_federated/python/core/impl/computation/BUILD index 8389cf0fca..675ce05d2a 100644 --- a/tensorflow_federated/python/core/impl/computation/BUILD +++ b/tensorflow_federated/python/core/impl/computation/BUILD @@ -61,6 +61,8 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_serialization", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -87,6 +89,8 @@ py_test( "//tensorflow_federated/python/core/impl/compiler:computation_factory", "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -117,6 +121,8 @@ py_test( "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_serialization", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -141,6 +147,8 @@ py_test( ":function_utils", "//tensorflow_federated/python/common_libs:structure", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -167,5 +175,7 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/impl/types:type_serialization", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/impl/context_stack/BUILD b/tensorflow_federated/python/core/impl/context_stack/BUILD index 2eef5f7def..453883b949 100644 --- a/tensorflow_federated/python/core/impl/context_stack/BUILD +++ b/tensorflow_federated/python/core/impl/context_stack/BUILD @@ -53,6 +53,7 @@ py_test( deps = [ ":context_stack_impl", ":context_stack_test_utils", + "@pypi_absl_py//:pkg", ], ) @@ -62,6 +63,7 @@ py_library( deps = [ ":context_base", ":context_stack_impl", + "@pypi_absl_py//:pkg", ], ) @@ -71,6 +73,7 @@ py_test( deps = [ ":context_stack_impl", ":context_stack_test_utils", + "@pypi_absl_py//:pkg", ], ) @@ -87,6 +90,7 @@ py_test( deps = [ ":context_stack_impl", ":get_context_stack", + "@pypi_absl_py//:pkg", ], ) @@ -113,6 +117,7 @@ py_test( ":context_stack_impl", ":context_stack_test_utils", ":set_default_context", + "@pypi_absl_py//:pkg", ], ) diff --git a/tensorflow_federated/python/core/impl/execution_contexts/BUILD b/tensorflow_federated/python/core/impl/execution_contexts/BUILD index 7e3a191b6c..a03bf68de6 100644 --- a/tensorflow_federated/python/core/impl/execution_contexts/BUILD +++ b/tensorflow_federated/python/core/impl/execution_contexts/BUILD @@ -51,6 +51,7 @@ py_test( deps = [ ":async_execution_context", "//tensorflow_federated/python/core/impl/executors:executors_errors", + "@pypi_absl_py//:pkg", ], ) @@ -70,6 +71,7 @@ py_test( deps = [ ":compiler_pipeline", "//tensorflow_federated/python/core/impl/computation:computation_base", + "@pypi_absl_py//:pkg", ], ) @@ -91,6 +93,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_analysis", "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/impl/types:typed_object", + "@pypi_attrs//:pkg", ], ) @@ -104,6 +107,8 @@ py_test( "//tensorflow_federated/python/common_libs:structure", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/impl/executor_stacks/BUILD b/tensorflow_federated/python/core/impl/executor_stacks/BUILD index 9c8d0ef9c1..d5dec9cc42 100644 --- a/tensorflow_federated/python/core/impl/executor_stacks/BUILD +++ b/tensorflow_federated/python/core/impl/executor_stacks/BUILD @@ -39,6 +39,8 @@ py_library( "//tensorflow_federated/python/core/impl/executors:executor_factory", "//tensorflow_federated/python/core/impl/executors:executors_errors", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_cachetools//:pkg", ], ) @@ -55,6 +57,7 @@ py_test( "//tensorflow_federated/python/core/impl/executors:executor_factory", "//tensorflow_federated/python/core/impl/executors:executor_test_utils_bindings", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", ], ) @@ -69,6 +72,8 @@ py_library( "//tensorflow_federated/python/core/impl/executors:remote_executor", "//tensorflow_federated/python/core/impl/executors:remote_executor_grpc_stub", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_portpicker//:pkg", ], ) @@ -97,6 +102,8 @@ py_test( ":executor_stack_bindings", "//tensorflow_federated/python/core/impl/executors:executor_bindings", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -108,6 +115,7 @@ py_library( "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/core/impl/executors:executor_base", "//tensorflow_federated/python/core/impl/executors:executor_factory", + "@pypi_cachetools//:pkg", ], ) @@ -121,5 +129,6 @@ py_test( "//tensorflow_federated/python/core/impl/executors:executor_base", "//tensorflow_federated/python/core/impl/executors:executor_factory", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", ], ) diff --git a/tensorflow_federated/python/core/impl/executors/BUILD b/tensorflow_federated/python/core/impl/executors/BUILD index 314b08c72b..e35a4587b0 100644 --- a/tensorflow_federated/python/core/impl/executors/BUILD +++ b/tensorflow_federated/python/core/impl/executors/BUILD @@ -45,6 +45,8 @@ py_test( "//tensorflow_federated/python/common_libs:structure", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -84,6 +86,8 @@ py_test( ":value_serialization", "//tensorflow_federated/python/common_libs:structure", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -100,6 +104,7 @@ py_test( deps = [ ":data_conversions", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", ], ) @@ -127,6 +132,8 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -148,6 +155,7 @@ py_library( ":data_conversions", "//tensorflow_federated/cc/core/impl/executors:executor_bindings", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_tensorflow//:pkg", ], ) @@ -162,6 +170,11 @@ py_test( ":executor_bindings", ":executor_test_utils_bindings", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_portpicker//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -203,6 +216,8 @@ py_test( ":executor_utils", "//tensorflow_federated/python/core/impl/compiler:building_block_factory", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -217,6 +232,7 @@ py_library( name = "executors_errors", srcs = ["executors_errors.py"], srcs_version = "PY3", + deps = ["@pypi_typing_extensions//:pkg"], ) py_library( @@ -242,6 +258,7 @@ py_library( "//tensorflow_federated/python/common_libs:tracing", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", ], ) @@ -257,6 +274,8 @@ py_test( "//tensorflow_federated/python/core/impl/compiler:computation_factory", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -277,6 +296,7 @@ py_library( "//tensorflow_federated/proto/v0:executor_py_pb2", "//tensorflow_federated/proto/v0:executor_py_pb2_grpc", "//tensorflow_federated/python/common_libs:tracing", + "@pypi_absl_py//:pkg", ], ) @@ -290,6 +310,8 @@ py_test( "//tensorflow_federated/proto/v0:executor_py_pb2", "//tensorflow_federated/proto/v0:executor_py_pb2_grpc", "//tensorflow_federated/python/core/impl/compiler:computation_factory", + "@pypi_absl_py//:pkg", + "@pypi_portpicker//:pkg", ], ) @@ -315,6 +337,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_transformations", "//tensorflow_federated/python/core/impl/utils:tensorflow_utils", "@com_google_protobuf//:protobuf_python", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -334,5 +358,8 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_serialization", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/core/impl/federated_context/BUILD b/tensorflow_federated/python/core/impl/federated_context/BUILD index b91aa11a5c..f705ba4d47 100644 --- a/tensorflow_federated/python/core/impl/federated_context/BUILD +++ b/tensorflow_federated/python/core/impl/federated_context/BUILD @@ -47,6 +47,8 @@ py_test( "//tensorflow_federated/python/core/impl/context_stack:get_context_stack", "//tensorflow_federated/python/core/impl/context_stack:runtime_error_context", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -78,6 +80,8 @@ py_test( "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -106,6 +110,8 @@ py_test( "//tensorflow_federated/python/core/impl/computation:function_utils", "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -128,6 +134,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_analysis", "//tensorflow_federated/python/core/impl/types:type_factory", + "@pypi_numpy//:pkg", ], ) @@ -144,6 +151,8 @@ py_test( "//tensorflow_federated/python/core/impl/context_stack:context_stack_test_utils", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -166,6 +175,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/impl/types:typed_object", + "@pypi_attrs//:pkg", ], ) @@ -183,6 +193,9 @@ py_test( "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -213,5 +226,7 @@ py_test( "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/impl/types/BUILD b/tensorflow_federated/python/core/impl/types/BUILD index 181f37daa9..3523169378 100644 --- a/tensorflow_federated/python/core/impl/types/BUILD +++ b/tensorflow_federated/python/core/impl/types/BUILD @@ -50,6 +50,7 @@ py_test( deps = [ ":array_shape", "//tensorflow_federated/proto/v0:array_py_pb2", + "@pypi_absl_py//:pkg", ], ) @@ -61,6 +62,11 @@ py_library( ":placements", "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/common_libs:structure", + "@pypi_attrs//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + "@pypi_typing_extensions//:pkg", ], ) @@ -86,19 +92,30 @@ py_test( ":placements", "//tensorflow_federated/python/common_libs:golden", "//tensorflow_federated/python/common_libs:structure", + "@pypi_absl_py//:pkg", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "dtype_utils", srcs = ["dtype_utils.py"], - deps = ["//tensorflow_federated/proto/v0:data_type_py_pb2"], + deps = [ + "//tensorflow_federated/proto/v0:data_type_py_pb2", + "@pypi_numpy//:pkg", + ], ) py_test( name = "dtype_utils_test", srcs = ["dtype_utils_test.py"], - deps = [":dtype_utils"], + deps = [ + ":dtype_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + ], ) py_library( @@ -110,7 +127,10 @@ py_test( name = "placements_test", size = "small", srcs = ["placements_test.py"], - deps = [":placements"], + deps = [ + ":placements", + "@pypi_absl_py//:pkg", + ], ) py_library( @@ -124,6 +144,7 @@ py_library( ":type_transformations", "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/common_libs:structure", + "@pypi_numpy//:pkg", ], ) @@ -136,6 +157,8 @@ py_test( ":placements", ":type_analysis", "//tensorflow_federated/python/common_libs:structure", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -148,6 +171,10 @@ py_library( ":typed_object", "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/common_libs:structure", + "@pypi_attrs//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -162,6 +189,10 @@ py_test( ":type_test_utils", ":typed_object", "//tensorflow_federated/python/common_libs:structure", + "@pypi_absl_py//:pkg", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -178,6 +209,8 @@ py_test( deps = [ ":computation_types", ":type_factory", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -207,6 +240,8 @@ py_test( ":type_serialization", "//tensorflow_federated/proto/v0:computation_py_pb2", "//tensorflow_federated/proto/v0:data_type_py_pb2", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -234,6 +269,8 @@ py_test( ":computation_types", ":placements", ":type_transformations", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/impl/utils/BUILD b/tensorflow_federated/python/core/impl/utils/BUILD index f35dfb4638..347926ebc0 100644 --- a/tensorflow_federated/python/core/impl/utils/BUILD +++ b/tensorflow_federated/python/core/impl/utils/BUILD @@ -37,6 +37,9 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_serialization", "//tensorflow_federated/python/tensorflow_libs:graph_utils", "//tensorflow_federated/python/tensorflow_libs:serialization_utils", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -53,5 +56,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:type_test_utils", "//tensorflow_federated/python/tensorflow_libs:serialization_utils", "//tensorflow_federated/python/tensorflow_libs:tensorflow_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/core/templates/BUILD b/tensorflow_federated/python/core/templates/BUILD index 4f00359cd0..5c372d1934 100644 --- a/tensorflow_federated/python/core/templates/BUILD +++ b/tensorflow_federated/python/core/templates/BUILD @@ -53,6 +53,8 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -84,6 +86,8 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -110,6 +114,8 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -124,6 +130,8 @@ py_library( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_attrs//:pkg", + "@pypi_dm_tree//:pkg", ], ) @@ -158,5 +166,7 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/core/test/BUILD b/tensorflow_federated/python/core/test/BUILD index 259c6cad36..9d74d8ee4e 100644 --- a/tensorflow_federated/python/core/test/BUILD +++ b/tensorflow_federated/python/core/test/BUILD @@ -48,5 +48,6 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:federated_computation", "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", ], ) diff --git a/tensorflow_federated/python/learning/BUILD b/tensorflow_federated/python/learning/BUILD index 807f814478..7121cfd15e 100644 --- a/tensorflow_federated/python/learning/BUILD +++ b/tensorflow_federated/python/learning/BUILD @@ -44,17 +44,24 @@ py_library( py_library( name = "client_weight_lib", srcs = ["client_weight_lib.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_library( name = "dataset_reduce", srcs = ["dataset_reduce.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_cpu_gpu_test( name = "dataset_reduce_test", srcs = ["dataset_reduce_test.py"], - deps = [":dataset_reduce"], + deps = [ + ":dataset_reduce", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_cpu_gpu_test( @@ -81,6 +88,9 @@ py_cpu_gpu_test( "//tensorflow_federated/python/learning/models:test_models", "//tensorflow_federated/python/learning/models:variable", "//tensorflow_federated/python/tensorflow_libs:tensorflow_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -116,6 +126,8 @@ py_test( "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:iterative_process", "//tensorflow_federated/python/core/test:static_assert", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -128,6 +140,7 @@ py_library( "//tensorflow_federated/python/core/environments/tensorflow_frontend:tensorflow_computation", "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_tensorflow//:pkg", ], ) @@ -141,6 +154,9 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:federated_computation", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -163,5 +179,6 @@ py_library( "//tensorflow_federated/python/learning/models:functional", "//tensorflow_federated/python/learning/models:model_weights", "//tensorflow_federated/python/learning/models:variable", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/learning/algorithms/BUILD b/tensorflow_federated/python/learning/algorithms/BUILD index 02f54eeeed..d21db4e701 100644 --- a/tensorflow_federated/python/learning/algorithms/BUILD +++ b/tensorflow_federated/python/learning/algorithms/BUILD @@ -57,6 +57,8 @@ py_library( "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:learning_process", "//tensorflow_federated/python/learning/templates:model_delta_client_work", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -75,6 +77,8 @@ py_cpu_gpu_test( "//tensorflow_federated/python/learning/models:model_examples", "//tensorflow_federated/python/learning/models:test_models", "//tensorflow_federated/python/learning/optimizers:sgdm", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -105,6 +109,8 @@ py_library( "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:learning_process", "//tensorflow_federated/python/learning/templates:model_delta_client_work", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -122,6 +128,8 @@ py_cpu_gpu_test( "//tensorflow_federated/python/learning/models:model_examples", "//tensorflow_federated/python/learning/models:test_models", "//tensorflow_federated/python/learning/optimizers:sgdm", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -147,6 +155,9 @@ py_library( "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:learning_process", "//tensorflow_federated/python/learning/templates:proximal_client_work", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -168,6 +179,8 @@ py_cpu_gpu_test( "//tensorflow_federated/python/learning/models:test_models", "//tensorflow_federated/python/learning/optimizers:sgdm", "//tensorflow_federated/python/learning/templates:distributors", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -198,6 +211,8 @@ py_library( "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:learning_process", "//tensorflow_federated/python/tensorflow_libs:tensor_utils", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -229,6 +244,11 @@ py_test( "//tensorflow_federated/python/learning/optimizers:sgdm", "//tensorflow_federated/python/learning/templates:composers", "//tensorflow_federated/python/learning/templates:distributors", + "@pypi_absl_py//:pkg", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + "@pypi_tensorflow_privacy//:pkg", ], ) @@ -255,6 +275,7 @@ py_library( "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:finalizers", "//tensorflow_federated/python/learning/templates:learning_process", + "@pypi_tensorflow//:pkg", ], ) @@ -277,6 +298,10 @@ py_test( "//tensorflow_federated/python/learning/templates:composers", "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:learning_process", + "@pypi_absl_py//:pkg", + "@pypi_attrs//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -306,6 +331,8 @@ py_library( "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:learning_process", "//tensorflow_federated/python/tensorflow_libs:tensor_utils", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -325,6 +352,9 @@ py_cpu_gpu_test( "//tensorflow_federated/python/learning/models:model_weights", "//tensorflow_federated/python/learning/models:test_models", "//tensorflow_federated/python/tensorflow_libs:tensorflow_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -346,6 +376,8 @@ py_library( "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:finalizers", "//tensorflow_federated/python/learning/templates:learning_process", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -357,6 +389,9 @@ py_test( "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -390,6 +425,8 @@ py_library( "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:learning_process", "//tensorflow_federated/python/tensorflow_libs:tensor_utils", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -433,6 +470,9 @@ py_cpu_gpu_test( "//tensorflow_federated/python/learning/templates:client_works", "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/tensorflow_libs:tensorflow_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -459,6 +499,7 @@ py_library( "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:finalizers", "//tensorflow_federated/python/learning/templates:learning_process", + "@pypi_tensorflow//:pkg", ], ) @@ -489,6 +530,9 @@ py_cpu_gpu_test( "//tensorflow_federated/python/learning/templates:distributors", "//tensorflow_federated/python/learning/templates:learning_process", "//tensorflow_federated/python/tensorflow_libs:tensorflow_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -508,6 +552,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/learning/models:model_weights", "//tensorflow_federated/python/learning/models:variable", + "@pypi_tensorflow//:pkg", ], ) @@ -523,5 +568,8 @@ py_cpu_gpu_test( "//tensorflow_federated/python/learning/models:keras_utils", "//tensorflow_federated/python/learning/models:model_examples", "//tensorflow_federated/python/learning/models:model_weights", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/learning/metrics/BUILD b/tensorflow_federated/python/learning/metrics/BUILD index 1665b6ad09..9a29dcc141 100644 --- a/tensorflow_federated/python/learning/metrics/BUILD +++ b/tensorflow_federated/python/learning/metrics/BUILD @@ -57,6 +57,9 @@ py_library( "//tensorflow_federated/python/core/templates:aggregation_process", "//tensorflow_federated/python/core/templates:estimation_process", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -75,6 +78,9 @@ py_test( "//tensorflow_federated/python/core/templates:estimation_process", "//tensorflow_federated/python/core/templates:measured_process", "//tensorflow_federated/python/core/test:static_assert", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -99,6 +105,9 @@ py_test( ":keras_finalizer", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -132,24 +141,39 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/test:static_assert", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "counters", srcs = ["counters.py"], + deps = [ + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "counters_test", srcs = ["counters_test.py"], - deps = [":counters"], + deps = [ + ":counters", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "keras_finalizer", srcs = ["keras_finalizer.py"], - deps = ["//tensorflow_federated/python/common_libs:py_typecheck"], + deps = [ + "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -160,13 +184,19 @@ py_test( "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/environments/tensorflow_frontend:tensorflow_computation", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "keras_utils", srcs = ["keras_utils.py"], - deps = ["//tensorflow_federated/python/tensorflow_libs:variable_utils"], + deps = [ + "//tensorflow_federated/python/tensorflow_libs:variable_utils", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -175,6 +205,9 @@ py_test( deps = [ ":counters", ":keras_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -187,6 +220,9 @@ py_test( "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/learning/models/BUILD b/tensorflow_federated/python/learning/models/BUILD index c4ff95a20e..5037c231f7 100644 --- a/tensorflow_federated/python/learning/models/BUILD +++ b/tensorflow_federated/python/learning/models/BUILD @@ -29,6 +29,8 @@ py_library( "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/common_libs:structure", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -56,6 +58,8 @@ py_library( "//tensorflow_federated/python/learning/metrics:keras_utils", "//tensorflow_federated/python/learning/metrics:types", "//tensorflow_federated/python/tensorflow_libs:variable_utils", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -72,6 +76,8 @@ py_test( "//tensorflow_federated/python/learning/metrics:aggregator", "//tensorflow_federated/python/learning/metrics:types", "//tensorflow_federated/python/tensorflow_libs:variable_utils", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -88,6 +94,8 @@ py_library( "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/learning/metrics:counters", "//tensorflow_federated/python/learning/metrics:keras_finalizer", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -108,13 +116,19 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/learning/metrics:aggregator", "//tensorflow_federated/python/learning/metrics:counters", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "model_examples", srcs = ["model_examples.py"], - deps = [":variable"], + deps = [ + ":variable", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -125,6 +139,8 @@ py_test( ":model_examples", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/environments/tensorflow_frontend:tensorflow_computation", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -142,6 +158,7 @@ py_library( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_conversions", "//tensorflow_federated/python/core/impl/types:type_serialization", + "@pypi_tensorflow//:pkg", ], ) @@ -153,6 +170,9 @@ py_test( ":variable", "//tensorflow_federated/python/common_libs:structure", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -163,6 +183,7 @@ py_library( ":model_weights", ":variable", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_tensorflow//:pkg", ], ) @@ -173,6 +194,9 @@ py_test( ":model_weights", ":reconstruction_model", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -190,6 +214,9 @@ py_test( "//tensorflow_federated/python/core/environments/tensorflow_frontend:tensorflow_computation", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_serialization", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -201,11 +228,16 @@ py_library( ":functional", ":variable", "//tensorflow_federated/python/learning/metrics:types", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "variable", srcs = ["variable.py"], - deps = ["//tensorflow_federated/python/learning/metrics:types"], + deps = [ + "//tensorflow_federated/python/learning/metrics:types", + "@pypi_tensorflow//:pkg", + ], ) diff --git a/tensorflow_federated/python/learning/optimizers/BUILD b/tensorflow_federated/python/learning/optimizers/BUILD index b778105f0e..41a4609806 100644 --- a/tensorflow_federated/python/learning/optimizers/BUILD +++ b/tensorflow_federated/python/learning/optimizers/BUILD @@ -23,6 +23,7 @@ py_library( deps = [ ":optimizer", "//tensorflow_federated/python/common_libs:structure", + "@pypi_tensorflow//:pkg", ], ) @@ -33,6 +34,8 @@ py_test( ":adafactor", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/environments/tensorflow_frontend:tensorflow_computation", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -42,6 +45,7 @@ py_library( deps = [ ":optimizer", "//tensorflow_federated/python/common_libs:structure", + "@pypi_tensorflow//:pkg", ], ) @@ -52,6 +56,8 @@ py_test( ":adagrad", ":optimizer", ":optimizer_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -61,6 +67,7 @@ py_library( deps = [ ":optimizer", "//tensorflow_federated/python/common_libs:structure", + "@pypi_tensorflow//:pkg", ], ) @@ -71,6 +78,8 @@ py_test( ":adam", ":optimizer", ":optimizer_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -93,7 +102,10 @@ py_library( py_library( name = "keras_optimizer", srcs = ["keras_optimizer.py"], - deps = [":optimizer"], + deps = [ + ":optimizer", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -106,6 +118,8 @@ py_test( ":sgdm", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/environments/tensorflow_frontend:tensorflow_computation", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -125,31 +139,47 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:intrinsics", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "optimizer", srcs = ["optimizer.py"], + deps = [ + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "optimizer_test", srcs = ["optimizer_test.py"], - deps = [":optimizer"], + deps = [ + ":optimizer", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "optimizer_test_utils", testonly = True, srcs = ["optimizer_test_utils.py"], - deps = [":optimizer"], + deps = [ + ":optimizer", + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "optimizer_test_utils_test", srcs = ["optimizer_test_utils_test.py"], - deps = [":optimizer_test_utils"], + deps = [ + ":optimizer_test_utils", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -158,6 +188,7 @@ py_library( deps = [ ":optimizer", "//tensorflow_federated/python/common_libs:structure", + "@pypi_tensorflow//:pkg", ], ) @@ -168,13 +199,18 @@ py_test( ":optimizer", ":optimizer_test_utils", ":rmsprop", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "scheduling", srcs = ["scheduling.py"], - deps = [":optimizer"], + deps = [ + ":optimizer", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -188,6 +224,8 @@ py_test( ":scheduling", ":sgdm", ":yogi", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -197,6 +235,7 @@ py_library( deps = [ ":optimizer", "//tensorflow_federated/python/common_libs:structure", + "@pypi_tensorflow//:pkg", ], ) @@ -207,6 +246,8 @@ py_test( ":optimizer", ":optimizer_test_utils", ":sgdm", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -216,6 +257,7 @@ py_library( deps = [ ":optimizer", "//tensorflow_federated/python/common_libs:structure", + "@pypi_tensorflow//:pkg", ], ) @@ -226,5 +268,7 @@ py_test( ":optimizer", ":optimizer_test_utils", ":yogi", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/learning/programs/BUILD b/tensorflow_federated/python/learning/programs/BUILD index c893648df7..10f8106fc6 100644 --- a/tensorflow_federated/python/learning/programs/BUILD +++ b/tensorflow_federated/python/learning/programs/BUILD @@ -34,6 +34,8 @@ py_library( "//tensorflow_federated/python/program:file_program_state_manager", "//tensorflow_federated/python/program:release_manager", "//tensorflow_federated/python/program:value_reference", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -58,6 +60,9 @@ py_test( "//tensorflow_federated/python/program:file_program_state_manager", "//tensorflow_federated/python/program:native_platform", "//tensorflow_federated/python/program:release_manager", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -86,6 +91,7 @@ py_library( "//tensorflow_federated/python/program:program_state_manager", "//tensorflow_federated/python/program:release_manager", "//tensorflow_federated/python/program:value_reference", + "@pypi_absl_py//:pkg", ], ) @@ -107,6 +113,8 @@ py_test( "//tensorflow_federated/python/program:native_platform", "//tensorflow_federated/python/program:program_state_manager", "//tensorflow_federated/python/program:release_manager", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -123,6 +131,7 @@ py_library( "//tensorflow_federated/python/program:release_manager", "//tensorflow_federated/python/program:structure_utils", "//tensorflow_federated/python/program:value_reference", + "@pypi_google_vizier//:pkg", ], ) @@ -140,5 +149,7 @@ py_test( "//tensorflow_federated/python/program:native_platform", "//tensorflow_federated/python/program:program_state_manager", "//tensorflow_federated/python/program:release_manager", + "@pypi_absl_py//:pkg", + "@pypi_google_vizier//:pkg", ], ) diff --git a/tensorflow_federated/python/learning/templates/BUILD b/tensorflow_federated/python/learning/templates/BUILD index 96343b0083..6d82f11cdf 100644 --- a/tensorflow_federated/python/learning/templates/BUILD +++ b/tensorflow_federated/python/learning/templates/BUILD @@ -49,6 +49,7 @@ py_library( "//tensorflow_federated/python/learning/optimizers:keras_optimizer", "//tensorflow_federated/python/learning/optimizers:optimizer", "//tensorflow_federated/python/tensorflow_libs:tensor_utils", + "@pypi_tensorflow//:pkg", ], ) @@ -66,6 +67,9 @@ py_test( "//tensorflow_federated/python/learning/models:model_weights", "//tensorflow_federated/python/learning/optimizers:optimizer", "//tensorflow_federated/python/learning/optimizers:sgdm", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -99,6 +103,8 @@ py_test( "//tensorflow_federated/python/core/templates:errors", "//tensorflow_federated/python/core/templates:measured_process", "//tensorflow_federated/python/learning/models:model_weights", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -157,6 +163,9 @@ py_test( "//tensorflow_federated/python/learning/models:model_examples", "//tensorflow_federated/python/learning/models:model_weights", "//tensorflow_federated/python/learning/optimizers:sgdm", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -190,6 +199,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:errors", "//tensorflow_federated/python/core/templates:measured_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -224,6 +236,8 @@ py_test( "//tensorflow_federated/python/core/templates:errors", "//tensorflow_federated/python/core/templates:measured_process", "//tensorflow_federated/python/learning/models:model_weights", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -246,6 +260,8 @@ py_test( "//tensorflow_federated/python/core/environments/tensorflow_frontend:tensorflow_computation", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -275,6 +291,9 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:errors", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -299,6 +318,7 @@ py_library( "//tensorflow_federated/python/learning/models:variable", "//tensorflow_federated/python/learning/optimizers:optimizer", "//tensorflow_federated/python/tensorflow_libs:tensor_utils", + "@pypi_tensorflow//:pkg", ], ) @@ -326,6 +346,9 @@ py_test( "//tensorflow_federated/python/learning/models:model_examples", "//tensorflow_federated/python/learning/models:model_weights", "//tensorflow_federated/python/learning/optimizers:sgdm", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -350,6 +373,8 @@ py_library( "//tensorflow_federated/python/learning/models:variable", "//tensorflow_federated/python/learning/optimizers:optimizer", "//tensorflow_federated/python/tensorflow_libs:tensor_utils", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -375,6 +400,9 @@ py_test( "//tensorflow_federated/python/learning/models:model_weights", "//tensorflow_federated/python/learning/models:test_models", "//tensorflow_federated/python/learning/optimizers:sgdm", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -395,5 +423,7 @@ py_test( ":type_checks", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/program/BUILD b/tensorflow_federated/python/program/BUILD index 94c8bc7f2f..4be4a8847a 100644 --- a/tensorflow_federated/python/program/BUILD +++ b/tensorflow_federated/python/program/BUILD @@ -47,6 +47,7 @@ py_library( "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_numpy//:pkg", ], ) @@ -57,6 +58,8 @@ py_test( ":client_id_data_source", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -78,6 +81,7 @@ py_library( "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_tensorflow//:pkg", ], ) @@ -88,6 +92,9 @@ py_test( ":dataset_data_source", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -116,6 +123,8 @@ py_test( "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -129,6 +138,9 @@ py_library( ":value_reference", "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/common_libs:serializable", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -140,6 +152,10 @@ py_test( ":file_utils", ":program_state_manager", ":program_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -152,6 +168,8 @@ py_library( ":structure_utils", ":value_reference", "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -164,6 +182,10 @@ py_test( ":program_test_utils", ":release_manager", ":structure_utils", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -173,13 +195,19 @@ py_library( deps = [ ":structure_utils", "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_tensorflow//:pkg", ], ) py_test( name = "file_utils_test", srcs = ["file_utils_test.py"], - deps = [":file_utils"], + deps = [ + ":file_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -188,6 +216,7 @@ py_library( deps = [ ":release_manager", ":value_reference", + "@pypi_absl_py//:pkg", ], ) @@ -197,6 +226,10 @@ py_test( deps = [ ":logging_release_manager", ":program_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -216,6 +249,10 @@ py_test( deps = [ ":memory_release_manager", ":program_test_utils", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -254,6 +291,10 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:federated_computation", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -289,6 +330,8 @@ py_test( "//tensorflow_federated/python/core/impl/federated_context:federated_computation", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) @@ -305,7 +348,10 @@ py_library( py_test( name = "program_state_manager_test", srcs = ["program_state_manager_test.py"], - deps = [":program_state_manager"], + deps = [ + ":program_state_manager", + "@pypi_absl_py//:pkg", + ], ) py_library( @@ -316,6 +362,10 @@ py_library( ":value_reference", "//tensorflow_federated/python/common_libs:serializable", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_attrs//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -326,6 +376,8 @@ py_library( ":structure_utils", ":value_reference", "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_attrs//:pkg", + "@pypi_dm_tree//:pkg", ], ) @@ -335,6 +387,10 @@ py_test( deps = [ ":program_test_utils", ":release_manager", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -347,6 +403,7 @@ py_library( "//tensorflow_federated/python/common_libs:serializable", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:type_serialization", + "@pypi_tensorflow//:pkg", ], ) @@ -357,12 +414,19 @@ py_test( ":program_test_utils", ":serialization_utils", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "structure_utils", srcs = ["structure_utils.py"], + deps = [ + "@pypi_attrs//:pkg", + "@pypi_dm_tree//:pkg", + ], ) py_test( @@ -371,6 +435,10 @@ py_test( deps = [ ":program_test_utils", ":structure_utils", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -382,6 +450,8 @@ py_library( ":structure_utils", ":value_reference", "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -391,6 +461,10 @@ py_test( deps = [ ":program_test_utils", ":tensorboard_release_manager", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -401,6 +475,7 @@ py_library( ":structure_utils", "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:typed_object", + "@pypi_numpy//:pkg", ], ) @@ -410,5 +485,9 @@ py_test( deps = [ ":program_test_utils", ":value_reference", + "@pypi_absl_py//:pkg", + "@pypi_dm_tree//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/simulation/BUILD b/tensorflow_federated/python/simulation/BUILD index 5d4917996e..ca5a4e06a0 100644 --- a/tensorflow_federated/python/simulation/BUILD +++ b/tensorflow_federated/python/simulation/BUILD @@ -64,19 +64,27 @@ py_test( "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:iterative_process", "//tensorflow_federated/python/learning/templates:learning_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "sampling_utils", srcs = ["sampling_utils.py"], + deps = ["@pypi_numpy//:pkg"], ) py_test( name = "sampling_utils_test", size = "small", srcs = ["sampling_utils_test.py"], - deps = [":sampling_utils"], + deps = [ + ":sampling_utils", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -88,6 +96,7 @@ py_library( "//tensorflow_federated/python/core/templates:iterative_process", "//tensorflow_federated/python/program:program_state_manager", "//tensorflow_federated/python/program:release_manager", + "@pypi_absl_py//:pkg", ], ) @@ -103,5 +112,7 @@ py_test( "//tensorflow_federated/python/core/impl/types:computation_types", "//tensorflow_federated/python/core/impl/types:placements", "//tensorflow_federated/python/core/templates:iterative_process", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", ], ) diff --git a/tensorflow_federated/python/simulation/baselines/BUILD b/tensorflow_federated/python/simulation/baselines/BUILD index 7da0f77293..51b082166a 100644 --- a/tensorflow_federated/python/simulation/baselines/BUILD +++ b/tensorflow_federated/python/simulation/baselines/BUILD @@ -37,6 +37,8 @@ py_library( deps = [ ":task_data", "//tensorflow_federated/python/learning/models:variable", + "@pypi_attrs//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -48,23 +50,30 @@ py_test( ":task_data", "//tensorflow_federated/python/learning/models:keras_utils", "//tensorflow_federated/python/simulation/datasets:client_data", + "@pypi_attrs//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "client_spec", srcs = ["client_spec.py"], + deps = ["@pypi_attrs//:pkg"], ) py_library( name = "keras_metrics", srcs = ["keras_metrics.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_test( name = "keras_metrics_test", srcs = ["keras_metrics_test.py"], - deps = [":keras_metrics"], + deps = [ + ":keras_metrics", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -73,6 +82,8 @@ py_library( deps = [ "//tensorflow_federated/python/core/impl/computation:computation_base", "//tensorflow_federated/python/simulation/datasets:client_data", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -82,5 +93,7 @@ py_test( deps = [ ":task_data", "//tensorflow_federated/python/simulation/datasets:client_data", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/simulation/baselines/cifar100/BUILD b/tensorflow_federated/python/simulation/baselines/cifar100/BUILD index 3e39ebfdf8..385d6b9c97 100644 --- a/tensorflow_federated/python/simulation/baselines/cifar100/BUILD +++ b/tensorflow_federated/python/simulation/baselines/cifar100/BUILD @@ -25,7 +25,10 @@ py_library( py_library( name = "image_classification_preprocessing", srcs = ["image_classification_preprocessing.py"], - deps = ["//tensorflow_federated/python/simulation/baselines:client_spec"], + deps = [ + "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -36,6 +39,8 @@ py_test( ":image_classification_preprocessing", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -52,6 +57,7 @@ py_library( "//tensorflow_federated/python/simulation/datasets:cifar100", "//tensorflow_federated/python/simulation/datasets:client_data", "//tensorflow_federated/python/simulation/models:resnet_models", + "@pypi_tensorflow//:pkg", ], ) @@ -64,5 +70,7 @@ py_test( "//tensorflow_federated/python/simulation/baselines:baseline_task", "//tensorflow_federated/python/simulation/baselines:client_spec", "//tensorflow_federated/python/simulation/models:resnet_models", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/simulation/baselines/emnist/BUILD b/tensorflow_federated/python/simulation/baselines/emnist/BUILD index 3eccaf2097..fd6654f1ca 100644 --- a/tensorflow_federated/python/simulation/baselines/emnist/BUILD +++ b/tensorflow_federated/python/simulation/baselines/emnist/BUILD @@ -38,6 +38,7 @@ py_library( "//tensorflow_federated/python/simulation/baselines:task_data", "//tensorflow_federated/python/simulation/datasets:client_data", "//tensorflow_federated/python/simulation/datasets:emnist", + "@pypi_tensorflow//:pkg", ], ) @@ -49,6 +50,8 @@ py_test( "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:baseline_task", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -65,6 +68,7 @@ py_library( "//tensorflow_federated/python/simulation/baselines:task_data", "//tensorflow_federated/python/simulation/datasets:client_data", "//tensorflow_federated/python/simulation/datasets:emnist", + "@pypi_tensorflow//:pkg", ], ) @@ -77,24 +81,33 @@ py_test( "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:baseline_task", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "emnist_models", srcs = ["emnist_models.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_test( name = "emnist_models_test", srcs = ["emnist_models_test.py"], - deps = [":emnist_models"], + deps = [ + ":emnist_models", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "emnist_preprocessing", srcs = ["emnist_preprocessing.py"], - deps = ["//tensorflow_federated/python/simulation/baselines:client_spec"], + deps = [ + "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -105,5 +118,7 @@ py_test( ":emnist_preprocessing", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/simulation/baselines/landmark/BUILD b/tensorflow_federated/python/simulation/baselines/landmark/BUILD index ff80ec9d04..1b8741f383 100644 --- a/tensorflow_federated/python/simulation/baselines/landmark/BUILD +++ b/tensorflow_federated/python/simulation/baselines/landmark/BUILD @@ -37,6 +37,7 @@ py_library( "//tensorflow_federated/python/simulation/datasets:client_data", "//tensorflow_federated/python/simulation/datasets:gldv2", "//tensorflow_federated/python/simulation/models:mobilenet_v2", + "@pypi_tensorflow//:pkg", ], ) @@ -48,13 +49,18 @@ py_test( "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:baseline_task", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "landmark_preprocessing", srcs = ["landmark_preprocessing.py"], - deps = ["//tensorflow_federated/python/simulation/baselines:client_spec"], + deps = [ + "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -64,5 +70,7 @@ py_test( ":landmark_preprocessing", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/simulation/baselines/shakespeare/BUILD b/tensorflow_federated/python/simulation/baselines/shakespeare/BUILD index a4d672c4c7..0bfef28ec8 100644 --- a/tensorflow_federated/python/simulation/baselines/shakespeare/BUILD +++ b/tensorflow_federated/python/simulation/baselines/shakespeare/BUILD @@ -25,18 +25,25 @@ py_library( py_library( name = "char_prediction_models", srcs = ["char_prediction_models.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_test( name = "char_prediction_models_test", srcs = ["char_prediction_models_test.py"], - deps = [":char_prediction_models"], + deps = [ + ":char_prediction_models", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "char_prediction_preprocessing", srcs = ["char_prediction_preprocessing.py"], - deps = ["//tensorflow_federated/python/simulation/baselines:client_spec"], + deps = [ + "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -47,6 +54,8 @@ py_test( ":char_prediction_preprocessing", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -64,6 +73,7 @@ py_library( "//tensorflow_federated/python/simulation/baselines:task_data", "//tensorflow_federated/python/simulation/datasets:client_data", "//tensorflow_federated/python/simulation/datasets:shakespeare", + "@pypi_tensorflow//:pkg", ], ) @@ -75,5 +85,7 @@ py_test( "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:baseline_task", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/simulation/baselines/stackoverflow/BUILD b/tensorflow_federated/python/simulation/baselines/stackoverflow/BUILD index 02e9a767fa..1690e83b5a 100644 --- a/tensorflow_federated/python/simulation/baselines/stackoverflow/BUILD +++ b/tensorflow_federated/python/simulation/baselines/stackoverflow/BUILD @@ -37,6 +37,7 @@ py_library( deps = [ ":constants", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_tensorflow//:pkg", ], ) @@ -48,6 +49,8 @@ py_test( ":tag_prediction_preprocessing", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -64,6 +67,7 @@ py_library( "//tensorflow_federated/python/simulation/baselines:task_data", "//tensorflow_federated/python/simulation/datasets:client_data", "//tensorflow_federated/python/simulation/datasets:stackoverflow", + "@pypi_tensorflow//:pkg", ], ) @@ -74,18 +78,25 @@ py_test( ":tag_prediction_tasks", "//tensorflow_federated/python/simulation/baselines:baseline_task", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "word_prediction_models", srcs = ["word_prediction_models.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_test( name = "word_prediction_models_test", srcs = ["word_prediction_models_test.py"], - deps = [":word_prediction_models"], + deps = [ + ":word_prediction_models", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -94,6 +105,8 @@ py_library( deps = [ ":constants", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_attrs//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -105,6 +118,8 @@ py_test( ":word_prediction_preprocessing", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -123,6 +138,7 @@ py_library( "//tensorflow_federated/python/simulation/baselines:task_data", "//tensorflow_federated/python/simulation/datasets:client_data", "//tensorflow_federated/python/simulation/datasets:stackoverflow", + "@pypi_tensorflow//:pkg", ], ) @@ -134,5 +150,7 @@ py_test( "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/simulation/baselines:baseline_task", "//tensorflow_federated/python/simulation/baselines:client_spec", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) diff --git a/tensorflow_federated/python/simulation/datasets/BUILD b/tensorflow_federated/python/simulation/datasets/BUILD index 413ac1af3b..12c0514319 100644 --- a/tensorflow_federated/python/simulation/datasets/BUILD +++ b/tensorflow_federated/python/simulation/datasets/BUILD @@ -45,6 +45,7 @@ py_library( deps = [ ":download", ":sql_client_data", + "@pypi_tensorflow//:pkg", ], ) @@ -52,7 +53,11 @@ py_test( name = "celeba_test", size = "small", srcs = ["celeba_test.py"], - deps = [":celeba"], + deps = [ + ":celeba", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -62,6 +67,7 @@ py_library( ":download", ":from_tensor_slices_client_data", ":sql_client_data", + "@pypi_tensorflow//:pkg", ], ) @@ -69,12 +75,17 @@ py_test( name = "cifar100_test", size = "small", srcs = ["cifar100_test.py"], - deps = [":cifar100"], + deps = [ + ":cifar100", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "dataset_utils", srcs = ["dataset_utils.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_test( @@ -84,19 +95,28 @@ py_test( deps = [ ":dataset_utils", ":from_tensor_slices_client_data", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "download", srcs = ["download.py"], + deps = [ + "@pypi_tensorflow//:pkg", + "@pypi_tqdm//:pkg", + ], ) py_test( name = "download_test", size = "small", srcs = ["download_test.py"], - deps = [":download"], + deps = [ + ":download", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -106,6 +126,7 @@ py_library( ":download", ":from_tensor_slices_client_data", ":sql_client_data", + "@pypi_tensorflow//:pkg", ], ) @@ -113,7 +134,11 @@ py_test( name = "emnist_test", timeout = "long", srcs = ["emnist_test.py"], - deps = [":emnist"], + deps = [ + ":emnist", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -122,13 +147,18 @@ py_library( deps = [ ":client_data", ":file_per_user_client_data", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_test( name = "flair_test", srcs = ["flair_test.py"], - deps = [":flair"], + deps = [ + ":flair", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -139,6 +169,7 @@ py_library( ":download", ":from_tensor_slices_client_data", ":sql_client_data", + "@pypi_tensorflow//:pkg", ], ) @@ -146,7 +177,11 @@ py_test( name = "shakespeare_test", size = "small", srcs = ["shakespeare_test.py"], - deps = [":shakespeare"], + deps = [ + ":shakespeare", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -156,6 +191,7 @@ py_library( ":download", ":from_tensor_slices_client_data", ":sql_client_data", + "@pypi_tensorflow//:pkg", ], ) @@ -163,7 +199,11 @@ py_test( name = "stackoverflow_test", size = "medium", srcs = ["stackoverflow_test.py"], - deps = [":stackoverflow"], + deps = [ + ":stackoverflow", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -173,6 +213,7 @@ py_library( ":client_data", ":from_tensor_slices_client_data", ":vision_datasets_utils", + "@pypi_tensorflow//:pkg", ], ) @@ -183,6 +224,7 @@ py_test( deps = [ ":gldv2", ":vision_datasets_utils", + "@pypi_tensorflow//:pkg", ], ) @@ -193,6 +235,7 @@ py_library( ":client_data", ":from_tensor_slices_client_data", ":vision_datasets_utils", + "@pypi_tensorflow//:pkg", ], ) @@ -203,6 +246,7 @@ py_test( deps = [ ":inaturalist", ":vision_datasets_utils", + "@pypi_tensorflow//:pkg", ], ) @@ -212,13 +256,17 @@ py_library( deps = [ ":client_data", ":file_per_user_client_data", + "@pypi_tensorflow//:pkg", ], ) py_test( name = "vision_datasets_utils_test", srcs = ["vision_datasets_utils_test.py"], - deps = [":vision_datasets_utils"], + deps = [ + ":vision_datasets_utils", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -228,6 +276,9 @@ py_library( "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/core/environments/tensorflow_frontend:tensorflow_computation", "//tensorflow_federated/python/core/impl/computation:computation_base", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -239,6 +290,8 @@ py_test( ":client_data", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/environments/tensorflow_frontend:tensorflow_computation", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -249,6 +302,7 @@ py_library( ":client_data", "//tensorflow_federated/python/common_libs:py_typecheck", "//tensorflow_federated/python/tensorflow_libs:tensor_utils", + "@pypi_tensorflow//:pkg", ], ) @@ -260,6 +314,7 @@ py_test( ":file_per_user_client_data", "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/impl/computation:computation_base", + "@pypi_tensorflow//:pkg", ], ) @@ -269,6 +324,7 @@ py_library( deps = [ ":client_data", "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_tensorflow//:pkg", ], ) @@ -281,6 +337,9 @@ py_test( "//tensorflow_federated/python/core/backends/native:execution_contexts", "//tensorflow_federated/python/core/impl/computation:computation_base", "//tensorflow_federated/python/core/impl/types:computation_types", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -290,6 +349,8 @@ py_library( deps = [ ":client_data", "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -300,6 +361,8 @@ py_test( deps = [ ":sql_client_data", "//tensorflow_federated/python/core/backends/native:execution_contexts", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) @@ -309,6 +372,7 @@ py_library( deps = [ ":client_data", "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_tensorflow//:pkg", ], ) @@ -319,6 +383,7 @@ py_test( ":from_tensor_slices_client_data", ":transforming_client_data", "//tensorflow_federated/python/core/backends/native:execution_contexts", + "@pypi_tensorflow//:pkg", ], ) @@ -328,11 +393,18 @@ py_library( deps = [ ":client_data", ":sql_client_data", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_test( name = "sql_client_data_utils_test", srcs = ["sql_client_data_utils_test.py"], - deps = [":sql_client_data_utils"], + deps = [ + ":sql_client_data_utils", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) diff --git a/tensorflow_federated/python/simulation/models/BUILD b/tensorflow_federated/python/simulation/models/BUILD index d62133aca9..f204d537e1 100644 --- a/tensorflow_federated/python/simulation/models/BUILD +++ b/tensorflow_federated/python/simulation/models/BUILD @@ -26,27 +26,42 @@ py_library( py_library( name = "mnist", srcs = ["mnist.py"], - deps = ["//tensorflow_federated/python/learning/metrics:counters"], + deps = [ + "//tensorflow_federated/python/learning/metrics:counters", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "mobilenet_v2", srcs = ["mobilenet_v2.py"], + deps = [ + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "mobilenet_v2_test", srcs = ["mobilenet_v2_test.py"], - deps = [":mobilenet_v2"], + deps = [ + ":mobilenet_v2", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "resnet_models", srcs = ["resnet_models.py"], + deps = [ + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "resnet_models_test", srcs = ["resnet_models_test.py"], - deps = [":resnet_models"], + deps = [ + ":resnet_models", + "@pypi_tensorflow//:pkg", + ], ) diff --git a/tensorflow_federated/python/tensorflow_libs/BUILD b/tensorflow_federated/python/tensorflow_libs/BUILD index 95dc6c3c75..a3441b13f2 100644 --- a/tensorflow_federated/python/tensorflow_libs/BUILD +++ b/tensorflow_federated/python/tensorflow_libs/BUILD @@ -24,7 +24,10 @@ py_library( py_library( name = "graph_optimizations", srcs = ["graph_optimizations.py"], - deps = [":graph_spec"], + deps = [ + ":graph_spec", + "@pypi_absl_py//:pkg", + ], ) py_test( @@ -33,29 +36,42 @@ py_test( deps = [ ":graph_optimizations", ":graph_spec", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "graph_spec", srcs = ["graph_spec.py"], + deps = [ + "@pypi_attrs//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "graph_spec_test", srcs = ["graph_spec_test.py"], - deps = [":graph_spec"], + deps = [ + ":graph_spec", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "graph_utils", srcs = ["graph_utils.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_test( name = "graph_utils_test", srcs = ["graph_utils_test.py"], - deps = [":graph_utils"], + deps = [ + ":graph_utils", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( @@ -64,6 +80,7 @@ py_library( deps = [ "//tensorflow_federated/python/common_libs:py_typecheck", "@com_google_protobuf//:protobuf_python", + "@pypi_tensorflow//:pkg", ], ) @@ -74,31 +91,45 @@ py_test( deps = [ ":serialization_utils", "@com_google_protobuf//:protobuf_python", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_library( name = "tensor_utils", srcs = ["tensor_utils.py"], - deps = ["//tensorflow_federated/python/common_libs:py_typecheck"], + deps = [ + "//tensorflow_federated/python/common_libs:py_typecheck", + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "tensor_utils_test", size = "small", srcs = ["tensor_utils_test.py"], - deps = [":tensor_utils"], + deps = [ + ":tensor_utils", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "tensorflow_test_utils", testonly = True, srcs = ["tensorflow_test_utils.py"], + deps = ["@pypi_tensorflow//:pkg"], ) py_library( name = "variable_utils", srcs = ["variable_utils.py"], + deps = [ + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -106,17 +137,25 @@ py_test( size = "small", timeout = "moderate", srcs = ["variable_utils_test.py"], - deps = [":variable_utils"], + deps = [ + ":variable_utils", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "version_check", srcs = ["version_check.py"], + deps = ["@pypi_semantic_version//:pkg"], ) py_test( name = "version_check_test", size = "small", srcs = ["version_check_test.py"], - deps = [":version_check"], + deps = [ + ":version_check", + "@pypi_absl_py//:pkg", + ], ) diff --git a/tensorflow_federated/python/tests/BUILD b/tensorflow_federated/python/tests/BUILD index 2b178f9445..daf22fc66c 100644 --- a/tensorflow_federated/python/tests/BUILD +++ b/tensorflow_federated/python/tests/BUILD @@ -17,13 +17,21 @@ py_test( name = "ast_generation_test", size = "small", srcs = ["ast_generation_test.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "async_execution_context_integration_test", srcs = ["async_execution_context_integration_test.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + ], ) py_test( @@ -34,20 +42,32 @@ py_test( ":temperature_sensor_example", ":test_contexts", "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", ], ) py_cpu_gpu_test( name = "backend_accelerators_test", srcs = ["backend_accelerators_test.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "map_reduce_form_test", size = "medium", srcs = ["map_reduce_form_test.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -55,7 +75,11 @@ py_test( size = "small", timeout = "long", srcs = ["mergeable_comp_execution_context_integration_test.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + ], ) py_test( @@ -64,7 +88,11 @@ py_test( timeout = "long", srcs = ["simulation_test.py"], shard_count = 4, - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( @@ -73,20 +101,34 @@ py_test( timeout = "moderate", srcs = ["remote_runtime_stream_structs_test.py"], tags = ["requires-mem:20g"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_test( name = "sync_local_cpp_execution_context_test", size = "small", srcs = ["sync_local_cpp_execution_context_test.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_absl_py//:pkg", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( name = "temperature_sensor_example", srcs = ["temperature_sensor_example.py"], - deps = ["//tensorflow_federated"], + deps = [ + "//tensorflow_federated", + "@pypi_numpy//:pkg", + "@pypi_tensorflow//:pkg", + ], ) py_library( diff --git a/tensorflow_federated/tools/BUILD b/tensorflow_federated/tools/BUILD index ec69fee686..2e1c00d379 100644 --- a/tensorflow_federated/tools/BUILD +++ b/tensorflow_federated/tools/BUILD @@ -27,4 +27,5 @@ bzl_library( py_binary( name = "build_docs", srcs = ["build_docs.py"], + deps = ["@pypi_absl_py//:pkg"], ) diff --git a/tensorflow_federated/tools/build.sh b/tensorflow_federated/tools/build.sh new file mode 100755 index 0000000000..64f91678bf --- /dev/null +++ b/tensorflow_federated/tools/build.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# Copyright 2024, The TensorFlow Federated Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -e + +usage() { + local script_name=$(basename "${0}") + local options=( + ) + echo "usage: ${script_name} ${options[@]}" + exit 1 +} + +main() { + + # Create a working directory. + local temp_dir="$(mktemp -d)" + trap "rm -rf ${temp_dir}" EXIT + # local temp_dir="/tmp/tff" + # rm -rf "${temp_dir}" + + # Create an environment. + # local copybara='/google/data/ro/teams/copybara/copybara' + /google/data/ro/teams/copybara/copybara \ + "tensorflow_federated/copy.bara.sky" \ + test_local \ + "${PWD}/.." \ + --folder-dir "${temp_dir}" + # cd "${temp_dir}" + + docker run \ + -v "${temp_dir}:/tmp/tff" \ + --rm \ + -ti tensorflow/build:latest-python3.11 + + + exit + + cd "/tmp/tff" + bazel test \ + --build_tag_filters="-nokokoro,-nopresubmit" \ + --test_size_filters=small,medium,large \ + --test_timeout_filters=short,moderate,long \ + --test_tag_filters="-nokokoro,-nopresubmit" \ + //tensorflow_federated/python/core/impl/types/... +} + +main "$@" diff --git a/third_party/jax/BUILD b/third_party/jax/BUILD new file mode 100644 index 0000000000..549609dd9b --- /dev/null +++ b/third_party/jax/BUILD @@ -0,0 +1,17 @@ +load("@rules_python//python:defs.bzl", "py_library") + +package( + default_applicable_licenses = ["//:package_license"], + default_visibility = ["//visibility:private"], +) + +licenses(["notice"]) + +py_library( + name = "jax", + visibility = ["//tensorflow_federated:__subpackages__"], + deps = [ + "@pypi_jax//:pkg", + "@pypi_jaxlib//:pkg", + ], +) diff --git a/third_party/tensorflow/python_toolchain.patch b/third_party/tensorflow/python_toolchain.patch deleted file mode 100644 index 4d732d447d..0000000000 --- a/third_party/tensorflow/python_toolchain.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff --git tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl -index a2bdd6a7eed..ec25c23d8d4 100644 ---- tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl -+++ tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl -@@ -2,7 +2,7 @@ - - load("//tensorflow/tools/toolchains:cpus/aarch64/aarch64.bzl", "remote_aarch64_configure") - load("//third_party/remote_config:remote_platform_configure.bzl", "remote_platform_configure") --load("//third_party/py:python_configure.bzl", "remote_python_configure") -+load("//third_party/py/non_hermetic:python_configure.bzl", "remote_python_configure") - - def ml2014_tf_aarch64_configs(name_container_map, env): - for name, container in name_container_map.items(): -diff --git tensorflow/tools/toolchains/remote_config/rbe_config.bzl tensorflow/tools/toolchains/remote_config/rbe_config.bzl -index 9f71a414bf7..57f70752323 100644 ---- tensorflow/tools/toolchains/remote_config/rbe_config.bzl -+++ tensorflow/tools/toolchains/remote_config/rbe_config.bzl -@@ -1,6 +1,6 @@ - """Macro that creates external repositories for remote config.""" - --load("//third_party/py:python_configure.bzl", "local_python_configure", "remote_python_configure") -+load("//third_party/py/non_hermetic:python_configure.bzl", "local_python_configure", "remote_python_configure") - load("//third_party/gpus:cuda_configure.bzl", "remote_cuda_configure") - load("//third_party/nccl:nccl_configure.bzl", "remote_nccl_configure") - load("//third_party/gpus:rocm_configure.bzl", "remote_rocm_configure") -diff --git tensorflow/workspace2.bzl tensorflow/workspace2.bzl -index 7e9faa558a4..5b18cb0969a 100644 ---- tensorflow/workspace2.bzl -+++ tensorflow/workspace2.bzl -@@ -8,7 +8,7 @@ load("//third_party/gpus:rocm_configure.bzl", "rocm_configure") - load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") - load("//third_party/nccl:nccl_configure.bzl", "nccl_configure") - load("//third_party/git:git_configure.bzl", "git_configure") --load("//third_party/py:python_configure.bzl", "python_configure") -+load("//third_party/py/non_hermetic:python_configure.bzl", "python_configure") - load("//third_party/systemlibs:syslibs_configure.bzl", "syslibs_configure") - load("//tensorflow/tools/toolchains:cpus/aarch64/aarch64_compiler_configure.bzl", "aarch64_compiler_configure") - load("//tensorflow/tools/toolchains:cpus/arm/arm_compiler_configure.bzl", "arm_compiler_configure") -diff --git third_party/py/non_hermetic/python_configure.bzl third_party/py/non_hermetic/python_configure.bzl -index 300cbfb6c71..09d98505dd9 100644 ---- third_party/py/non_hermetic/python_configure.bzl -+++ third_party/py/non_hermetic/python_configure.bzl -@@ -206,7 +206,7 @@ def _create_local_python_repository(repository_ctx): - # Resolve all labels before doing any real work. Resolving causes the - # function to be restarted with all previous state being lost. This - # can easily lead to a O(n^2) runtime in the number of labels. -- build_tpl = repository_ctx.path(Label("//third_party/py:BUILD.tpl")) -+ build_tpl = repository_ctx.path(Label("//third_party/py/non_hermetic:BUILD.tpl")) - - python_bin = get_python_bin(repository_ctx) - _check_python_bin(repository_ctx, python_bin) -diff --git third_party/py/numpy/BUILD third_party/py/numpy/BUILD -index 97c7907fc38..c80cc5287bc 100644 ---- third_party/py/numpy/BUILD -+++ third_party/py/numpy/BUILD -@@ -2,14 +2,15 @@ licenses(["restricted"]) - - package(default_visibility = ["//visibility:public"]) - --alias( -+py_library( - name = "numpy", -- actual = "@pypi_numpy//:pkg", -+ srcs = ["tf_numpy_dummy.py"], -+ srcs_version = "PY3", - ) - - alias( - name = "headers", -- actual = "@pypi_numpy//:numpy_headers", -+ actual = "@local_config_python//:numpy_headers", - ) - - genrule(