|
| 1 | +# Copyright 2019 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# Description: |
| 16 | +# Build rules for Estimator APIs in Neural Structured Learning. |
| 17 | + |
| 18 | +# Placeholder for internal Python strict compatibility macro. |
| 19 | +# Placeholder for internal Python version compatibility macro. |
| 20 | + |
| 21 | +package( |
| 22 | + default_visibility = ["//visibility:public"], |
| 23 | + licenses = ["notice"], # Apache 2.0 |
| 24 | +) |
| 25 | + |
| 26 | +exports_files(["LICENSE"]) |
| 27 | + |
| 28 | +py_library( |
| 29 | + name = "estimator", |
| 30 | + srcs = ["__init__.py"], |
| 31 | + srcs_version = "PY2AND3", |
| 32 | + deps = [ |
| 33 | + ":adversarial_regularization", |
| 34 | + ":graph_regularization", |
| 35 | + ], |
| 36 | +) |
| 37 | + |
| 38 | +py_library( |
| 39 | + name = "adversarial_regularization", |
| 40 | + srcs = ["adversarial_regularization.py"], |
| 41 | + srcs_version = "PY2AND3", |
| 42 | + deps = [ |
| 43 | + "//neural_structured_learning/configs", |
| 44 | + "//neural_structured_learning/lib", |
| 45 | + # package tensorflow |
| 46 | + ], |
| 47 | +) |
| 48 | + |
| 49 | +py_test( |
| 50 | + name = "adversarial_regularization_test", |
| 51 | + srcs = ["adversarial_regularization_test.py"], |
| 52 | + srcs_version = "PY2AND3", |
| 53 | + deps = [ |
| 54 | + ":estimator", |
| 55 | + "//neural_structured_learning/configs", |
| 56 | + # package numpy |
| 57 | + # package tensorflow |
| 58 | + # package tensorflow framework_test_lib, |
| 59 | + ], |
| 60 | +) |
| 61 | + |
| 62 | +py_library( |
| 63 | + name = "graph_regularization", |
| 64 | + srcs = ["graph_regularization.py"], |
| 65 | + srcs_version = "PY2AND3", |
| 66 | + deps = [ |
| 67 | + "//neural_structured_learning/configs", |
| 68 | + "//neural_structured_learning/lib:distances", |
| 69 | + "//neural_structured_learning/lib:utils", |
| 70 | + # package tensorflow |
| 71 | + ], |
| 72 | +) |
| 73 | + |
| 74 | +py_test( |
| 75 | + name = "graph_regularization_test", |
| 76 | + srcs = ["graph_regularization_test.py"], |
| 77 | + srcs_version = "PY2AND3", |
| 78 | + deps = [ |
| 79 | + ":estimator", |
| 80 | + # package protobuf, |
| 81 | + "//neural_structured_learning/configs", |
| 82 | + # package numpy |
| 83 | + # package tensorflow |
| 84 | + # package tensorflow framework_test_lib, |
| 85 | + ], |
| 86 | +) |
0 commit comments