1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE"])
load("//tensorflow:tensorflow.bzl", "py_test")
# Transitive dependencies of this target will be included in the pip package.
py_library(
name = "constrained_optimization_pip",
deps = [
":constrained_optimization",
":test_util",
],
)
py_library(
name = "constrained_optimization",
srcs = [
"__init__.py",
"python/candidates.py",
"python/constrained_minimization_problem.py",
"python/constrained_optimizer.py",
"python/external_regret_optimizer.py",
"python/swap_regret_optimizer.py",
],
srcs_version = "PY2AND3",
deps = [
"//tensorflow/python:control_flow_ops",
"//tensorflow/python:dtypes",
"//tensorflow/python:framework",
"//tensorflow/python:standard_ops",
"//tensorflow/python:state_ops",
"//tensorflow/python:training",
"//third_party/py/numpy",
"@six_archive//:six",
],
)
py_test(
name = "candidates_test",
srcs = ["python/candidates_test.py"],
srcs_version = "PY2AND3",
deps = [
":constrained_optimization",
"//tensorflow/python:client_testlib",
"//third_party/py/numpy",
],
)
# NOTE: This library can't be "testonly" since it needs to be included in the
# pip package.
py_library(
name = "test_util",
srcs = ["python/test_util.py"],
srcs_version = "PY2AND3",
deps = [
":constrained_optimization",
"//tensorflow/python:dtypes",
"//tensorflow/python:standard_ops",
],
)
py_test(
name = "external_regret_optimizer_test",
srcs = ["python/external_regret_optimizer_test.py"],
srcs_version = "PY2AND3",
deps = [
":constrained_optimization",
":test_util",
"//tensorflow/python:client_testlib",
"//tensorflow/python:standard_ops",
"//tensorflow/python:training",
"//third_party/py/numpy",
],
)
py_test(
name = "swap_regret_optimizer_test",
srcs = ["python/swap_regret_optimizer_test.py"],
srcs_version = "PY2AND3",
deps = [
":constrained_optimization",
":test_util",
"//tensorflow/python:client_testlib",
"//tensorflow/python:standard_ops",
"//tensorflow/python:training",
"//third_party/py/numpy",
],
)
|