forked from twitter/the-algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD
186 lines (172 loc) · 4.93 KB
/
BUILD
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
twml_sources = [
"twml/**/*.py",
]
twml_deps = [
"3rdparty/python/cherrypy:default",
"3rdparty/python/pyyaml:default",
"3rdparty/python/absl-py:default",
"3rdparty/python/joblib:default",
"3rdparty/python/kazoo:default",
"3rdparty/python/python-dateutil:default",
"3rdparty/python/pytz:default",
"cortex/ml-metastore/src/main/python/com/twitter/mlmetastore/modelrepo/client",
"src/python/twitter/common/app",
"src/python/twitter/common/app/modules:vars",
"src/python/twitter/common/metrics",
"src/python/twitter/deepbird/compat/v1/optimizers",
"src/python/twitter/deepbird/compat/v1/rnn",
"src/python/twitter/deepbird/hparam",
"src/python/twitter/deepbird/io",
"src/python/twitter/deepbird/io/legacy",
"src/python/twitter/deepbird/logging",
"src/python/twitter/deepbird/sparse",
"src/python/twitter/deepbird/stats_server",
"src/python/twitter/deepbird/util:simple-data-record-handler",
"src/python/twitter/deepbird/util/hashing",
"src/python/twitter/ml/api/dal",
"src/python/twitter/ml/common:metrics",
"src/python/twitter/ml/common/kubernetes",
"src/python/twitter/ml/common:resources",
"src/python/twitter/ml/twml/kubernetes",
"src/python/twitter/ml/twml:status",
"src/thrift/com/twitter/dal:dal_no_constants-python",
"src/thrift/com/twitter/statebird:compiled-v2-python",
]
python3_library(
name = "twml-test-common-deps",
tags = ["no-mypy"],
dependencies = [
"src/python/twitter/deepbird/util:inference",
"src/python/twitter/deepbird/util/data",
"src/thrift/com/twitter/ml/api:data-python",
"twml/tests/data:resources",
],
)
python3_library(
name = "twml_packer_deps_no_tf",
tags = [
"bazel-compatible",
"no-mypy",
],
dependencies = [
"3rdparty/python/numpy:default",
"3rdparty/python/pandas:default",
"3rdparty/python/pyyaml:default",
"3rdparty/python/requests:default",
"3rdparty/python/scikit-learn:default",
"3rdparty/python/scipy:default",
"3rdparty/python/tensorflow-hub:default",
"3rdparty/python/thriftpy2:default",
],
)
python3_library(
name = "twml_packer_deps_no_tf_py3",
tags = [
"known-to-fail-jira:CX-20246",
"no-mypy",
],
dependencies = [
":twml_packer_deps_no_tf",
"3rdparty/python/tensorflow-model-analysis",
],
)
alias(
name = "twml-test-shared",
target = ":twml_common",
)
python3_library(
name = "twml_common",
sources = ["twml_common/**/*.py"],
tags = [
"bazel-compatible",
"no-mypy",
],
)
# Alias twml-dev to twml to avoid breaking user targets.
alias(
name = "twml-dev",
target = "twml",
)
python3_library(
name = "twml-test-dev-deps",
tags = [
"bazel-compatible",
"no-mypy",
],
dependencies = [
":twml",
":twml-test-common-deps",
":twml-test-shared",
"3rdparty/python/freezegun:default",
"src/python/twitter/deepbird/keras/layers",
"src/thrift/com/twitter/ml/api:data-python",
"src/thrift/com/twitter/ml/prediction_service:prediction_service-python",
],
)
python3_library(
name = "twml-dev-python",
sources = twml_sources,
tags = [
"bazel-compatible",
"no-mypy",
],
dependencies = twml_deps + [
":twml_packer_deps_no_tf",
"3rdparty/python/tensorflow",
"3rdparty/python/twml:libtwml-universal",
"twml/libtwml:libtwml-python",
],
)
# Build a smaller .pex file that models can depend on.
# Tensorflow and other dependencies are downloaded from Packer on Aurora.
# Note: This gets the C++ ops through 3rdparty artifacts.
python3_library(
name = "twml-nodeps",
sources = twml_sources,
tags = [
"bazel-compatible",
"no-mypy",
],
dependencies = twml_deps + [
"3rdparty/python/twml:libtwml-universal",
],
)
python3_library(
name = "twml",
tags = [
"bazel-compatible",
"no-mypy",
],
dependencies = [
":twml-nodeps",
":twml_packer_deps_no_tf",
"3rdparty/python/tensorflow",
],
)
python37_binary(
name = "tensorboard",
source = "twml/tensorboard/__main__.py",
dependencies = [
"3rdparty/python/_closures/twml:tensorboard",
"3rdparty/python/tensorflow",
],
)
python37_binary(
name = "saved_model_cli",
source = "twml/saved_model_cli/__main__.py",
dependencies = [
"3rdparty/python/_closures/twml:saved_model_cli",
"3rdparty/python/tensorflow",
],
)
# This target is added so twml can be used regardless of the Tensorflow version:
# This target does not pull in TensorFlow 1.x or the related libtwml compiled using TF 1.x.
python3_library(
name = "twml-py-source-only",
sources = twml_sources,
tags = [
"known-to-fail-jira:CX-23416",
"no-mypy",
],
dependencies = twml_deps,
)