tensorflow_privacy/tensorflow_privacy/privacy/logistic_regression/BUILD
Galen Andrew 77d962e0fc Use DP library's calibrate_dp_mechanism function to compute noise multiplier.
calibrate_dp_mechanism is in dp_accounting's top level symbols, so after this change we can replace all of the dependencies on DP accounting subpackages with dp_accounting.

Tested by verifying that the resulting noise multiplier is the same before and after change when running all tests in multinomial_logistic_test.

PiperOrigin-RevId: 458235745
2022-06-30 08:47:54 -07:00

68 lines
1.6 KiB
Text

load("@rules_python//python:defs.bzl", "py_library", "py_test")
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
py_library(
name = "multinomial_logistic",
srcs = ["multinomial_logistic.py"],
srcs_version = "PY3",
deps = [
":datasets",
":single_layer_softmax",
"//tensorflow_privacy/privacy/optimizers:dp_optimizer_keras",
"@com_google_differential_py//python/dp_accounting:dp_event",
"@com_google_differential_py//python/dp_accounting:mechanism_calibration",
"@com_google_differential_py//python/dp_accounting/rdp:rdp_privacy_accountant",
],
)
py_test(
name = "multinomial_logistic_test",
size = "large",
srcs = ["multinomial_logistic_test.py"],
local = True,
python_version = "PY3",
srcs_version = "PY3",
deps = [
":datasets",
":multinomial_logistic",
"//tensorflow_privacy/privacy/analysis:compute_dp_sgd_privacy_lib",
],
)
py_library(
name = "datasets",
srcs = ["datasets.py"],
srcs_version = "PY3",
)
py_test(
name = "datasets_test",
size = "small",
srcs = ["datasets_test.py"],
python_version = "PY3",
srcs_version = "PY3",
tags = ["requires-net:external"],
deps = [":datasets"],
)
py_library(
name = "single_layer_softmax",
srcs = ["single_layer_softmax.py"],
srcs_version = "PY3",
deps = [":datasets"],
)
py_test(
name = "single_layer_softmax_test",
size = "medium",
srcs = ["single_layer_softmax_test.py"],
python_version = "PY3",
srcs_version = "PY3",
deps = [
":datasets",
":single_layer_softmax",
],
)