1load("//tensorflow:tensorflow.bzl", "tf_python_pybind_extension") 2 3# buildifier: disable=same-origin-load 4load("//tensorflow:tensorflow.bzl", "tf_py_test") 5 6package( 7 default_visibility = ["//tensorflow:internal"], 8 licenses = ["notice"], # Apache 2.0 9) 10 11tf_python_pybind_extension( 12 name = "_pywrap_server_lib", 13 srcs = ["server_lib_wrapper.cc"], 14 module_name = "_pywrap_server_lib", 15 deps = [ 16 "//tensorflow/core:lib", 17 "//tensorflow/core/data/service:server_lib_headers_lib", 18 "//tensorflow/python:pybind11_lib", 19 "//tensorflow/python:pybind11_status", 20 "//third_party/python_runtime:headers", 21 "@pybind11", 22 ], 23) 24 25py_library( 26 name = "server_lib", 27 srcs = ["server_lib.py"], 28 srcs_version = "PY3", 29 visibility = [ 30 "//visibility:public", 31 ], 32 deps = [ 33 ":_pywrap_server_lib", 34 ], 35) 36 37tf_py_test( 38 name = "server_lib_test", 39 srcs = ["server_lib_test.py"], 40 deps = [ 41 ":server_lib", 42 "//tensorflow/core:protos_all_py", 43 "//tensorflow/python:errors", 44 "//tensorflow/python:platform_test", 45 "//tensorflow/python/profiler:profiler_client", 46 ], 47) 48 49py_library( 50 name = "service", 51 srcs = ["__init__.py"], 52 srcs_version = "PY3", 53 deps = [ 54 ":server_lib", 55 "//tensorflow/python/data/experimental/ops:data_service_ops", 56 ], 57) 58