Skip to content

Commit

Permalink
Remove pip dependency on tensorflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cliveverghese committed Jan 13, 2025
1 parent d11ffb8 commit 740e2fe
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 1,979 deletions.
11 changes: 0 additions & 11 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ exports_files([
"rollup.config.js",
])

py_library(
name = "expect_tensorflow_installed",
# This is a dummy rule used as a tensorflow dependency in open-source.
# We expect tensorflow to already be installed on the system, e.g. via
# `pip install tensorflow`
visibility = ["//visibility:public"],
deps = [
requirement("tensorflow"),
],
)

compile_pip_requirements(
name = "requirements",
extra_args = [
Expand Down
1 change: 0 additions & 1 deletion plugin/tensorboard_plugin_profile/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ py_library(
srcs = ["profile_plugin.py"],
srcs_version = "PY2AND3",
deps = [
"//:expect_tensorflow_installed",
"@org_pocoo_werkzeug",
"@org_pythonhosted_six",
"@org_tensorflow//tensorflow/python/profiler/internal:_pywrap_profiler_plugin",
Expand Down
8 changes: 0 additions & 8 deletions plugin/tensorboard_plugin_profile/convert/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ py_test(
srcs_version = "PY2AND3",
deps = [
":diagnostics",
"//:expect_tensorflow_installed",
"//third_party/py/google/protobuf:use_fast_cpp_protos", # Automatically added go/proto_python_upb_flip
"@org_xprof//plugin/tensorboard_plugin_profile/protobuf:protos_all_py_pb2",
],
Expand Down Expand Up @@ -72,7 +71,6 @@ py_test(
requirement("absl-py"), # build_cleaner: keep; go/disable_tf2
"//third_party/py/google/protobuf:use_fast_cpp_protos", # Automatically added go/proto_python_upb_flip
requirement("gviz_api"),
"//:expect_tensorflow_installed",
"@org_xprof//plugin/tensorboard_plugin_profile/protobuf:protos_all_py_pb2",
],
)
Expand Down Expand Up @@ -119,7 +117,6 @@ py_test(
requirement("absl-py"), # build_cleaner: keep; go/disable_tf2
"//third_party/py/google/protobuf:use_fast_cpp_protos", # Automatically added go/proto_python_upb_flip
requirement("gviz_api"),
"//:expect_tensorflow_installed",
"@org_xprof//plugin/tensorboard_plugin_profile/protobuf:protos_all_py_pb2",
],
)
Expand All @@ -143,7 +140,6 @@ py_test(
requirement("absl-py"), # build_cleaner: keep; go/disable_tf2
"//third_party/py/google/protobuf:use_fast_cpp_protos", # Automatically added go/proto_python_upb_flip
requirement("gviz_api"),
"//:expect_tensorflow_installed",
"@org_xprof//plugin/tensorboard_plugin_profile/protobuf:protos_all_py_pb2",
],
)
Expand All @@ -167,7 +163,6 @@ py_test(
deps = [
":trace_events_json",
requirement("absl-py"), # build_cleaner: keep; go/disable_tf2
"//:expect_tensorflow_installed",
"//third_party/py/google/protobuf:use_fast_cpp_protos", # Automatically added go/proto_python_upb_flip
"@org_xprof//plugin/tensorboard_plugin_profile/protobuf:protos_all_py_pb2",
],
Expand All @@ -192,7 +187,6 @@ py_test(
requirement("absl-py"), # build_cleaner: keep; go/disable_tf2
"//third_party/py/google/protobuf:use_fast_cpp_protos", # Automatically added go/proto_python_upb_flip
requirement("gviz_api"),
"//:expect_tensorflow_installed",
"@org_xprof//plugin/tensorboard_plugin_profile/protobuf:protos_all_py_pb2",
],
)
Expand All @@ -218,7 +212,6 @@ py_test(
requirement("absl-py"), # build_cleaner: keep; go/disable_tf2
"//third_party/py/google/protobuf:use_fast_cpp_protos", # Automatically added go/proto_python_upb_flip
requirement("gviz_api"),
"//:expect_tensorflow_installed",
"@org_xprof//plugin/tensorboard_plugin_profile/protobuf:protos_all_py_pb2",
],
)
Expand All @@ -244,7 +237,6 @@ py_test(
":dcn_collective_stats_proto_to_gviz",
"//third_party/py/google/protobuf:use_fast_cpp_protos", # Automatically added go/proto_python_upb_flip
requirement("gviz_api"),
"//:expect_tensorflow_installed",
"@org_xprof//plugin/tensorboard_plugin_profile/protobuf:protos_all_py_pb2",
],
)
Expand Down
1 change: 0 additions & 1 deletion plugin/tensorboard_plugin_profile/demo/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ py_binary(
srcs_version = "PY2AND3",
deps = [
requirement("absl-py"), # build_cleaner: keep; go/disable_tf2
"//:expect_tensorflow_installed",
"//third_party/py/google/protobuf:use_fast_cpp_protos", # Automatically added go/proto_python_upb_flip
"@org_tensorflow_tensorboard//tensorboard/backend/event_processing:plugin_asset_util",
"@org_xprof//plugin/tensorboard_plugin_profile:profile_plugin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ profiler_test(
"v4",
],
deps = [
"//:expect_tensorflow_installed",
"//plugin/tensorboard_plugin_profile/convert:raw_to_tool_data",
"//plugin/tensorboard_plugin_profile/integration_tests:tf_mnist",
"//plugin/tensorboard_plugin_profile/integration_tests:tf_profiler_session",
Expand All @@ -27,7 +26,6 @@ py_strict_library(
srcs = ["tpu_tf2_keras_test.py"],
visibility = ["//plugin:__pkg__"],
deps = [
"//:expect_tensorflow_installed",
"//plugin/tensorboard_plugin_profile/convert:raw_to_tool_data",
"//plugin/tensorboard_plugin_profile/integration_tests:tf_mnist",
"//plugin/tensorboard_plugin_profile/integration_tests:tf_profiler_session",
Expand Down
1 change: 0 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
absl-py >= 2.1.0
gviz_api >= 1.10.0
tensorflow >= 2.17.0
setuptools <= 71.0.0
Loading

0 comments on commit 740e2fe

Please sign in to comment.