Skip to content

Commit 6227be9

Browse files
authored
LSC: Add load() statements for Blaze-builtin Python rules/providers. (#6495)
LSC: Add load() statements for Blaze-builtin Python rules/providers. load()s are being added in preparation for moving the rule implementations out of Blaze itself. More information: [go/py-add-loads-lsc](https://goto.google.com/py-add-loads-lsc) example CL: https://critique.corp.google.com/cl/518105787 Tests done: ``` bazel build //tensorboard ``` Build completed successfully ``` bazel run //tensorboard -- --logdir /google/data/ro/teams/tensorboard/logfiles --bind_all ``` Started up standalone TensorBoard successfully. Verified that the dashboard works as expected.
1 parent 04cdc62 commit 6227be9

File tree

48 files changed

+128
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+128
-5
lines changed

WORKSPACE

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories"
3737

3838
web_test_repositories(omit_bazel_skylib = True)
3939

40+
# rules_python has to be placed before load("@io_bazel_rules_closure//closure:repositories.bzl")
41+
# in the dependencies list, otherwise we get "cannot load '@rules_python//python:py_xxx.bzl': no such file"
42+
http_archive(
43+
name = "rules_python",
44+
sha256 = "0a8003b044294d7840ac7d9d73eef05d6ceb682d7516781a4ec62eeb34702578",
45+
strip_prefix = "rules_python-0.24.0",
46+
urls = [
47+
"http://mirror.tensorflow.org/github.com/bazelbuild/rules_python/releases/download/0.24.0/rules_python-0.24.0.tar.gz",
48+
"https://github.com/bazelbuild/rules_python/releases/download/0.24.0/rules_python-0.24.0.tar.gz", # 2023-07-11
49+
],
50+
)
51+
4052
load("@io_bazel_rules_webtesting//web:py_repositories.bzl", "py_repositories")
4153

4254
py_repositories()

tensorboard/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
load("//tensorboard/defs:py_repl.bzl", "py_repl")
55
load("//tensorboard/defs:web.bzl", "tf_web_library")
66
load("//tensorboard/defs:zipper.bzl", "tensorboard_zip_file")
7+
load("@rules_python//python:py_binary.bzl", "py_binary")
8+
load("@rules_python//python:py_library.bzl", "py_library")
9+
load("@rules_python//python:py_test.bzl", "py_test")
710

811
package(default_visibility = [":internal"])
912

tensorboard/backend/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Description:
22
# TensorBoard, a dashboard for investigating TensorFlow
33

4+
load("@rules_python//python:py_library.bzl", "py_library")
5+
load("@rules_python//python:py_test.bzl", "py_test")
6+
47
package(default_visibility = ["//tensorboard:internal"])
58

69
licenses(["notice"])

tensorboard/backend/event_processing/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Description:
22
# Event processing logic for TensorBoard
3+
load("@rules_python//python:py_library.bzl", "py_library")
4+
load("@rules_python//python:py_test.bzl", "py_test")
35

46
package(default_visibility = ["//tensorboard:internal"])
57

tensorboard/compat/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Description:
22
# Compatibility interfaces for TensorBoard.
3+
load("@rules_python//python:py_library.bzl", "py_library")
34

45
package(default_visibility = ["//tensorboard:internal"])
56

tensorboard/compat/proto/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Description:
22
# TensorBoard, a dashboard for investigating TensorFlow
33

4+
load("@rules_python//python:py_test.bzl", "py_test")
45
load("//tensorboard/defs:protos.bzl", "tb_proto_library")
56

67
package(default_visibility = ["//tensorboard:internal"])

tensorboard/compat/tensorflow_stub/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Description:
22
# TensorBoard, a dashboard for investigating TensorFlow
3+
load("@rules_python//python:py_library.bzl", "py_library")
4+
load("@rules_python//python:py_test.bzl", "py_test")
35

46
package(default_visibility = ["//tensorboard:internal"])
57

tensorboard/data/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Description:
22
# Experimental framework for generic TensorBoard data providers.
33

4+
load("@rules_python//python:py_library.bzl", "py_library")
5+
load("@rules_python//python:py_test.bzl", "py_test")
6+
47
package(default_visibility = ["//tensorboard:internal"])
58

69
licenses(["notice"])

tensorboard/data/experimental/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Description:
22
# Experiment Data Access API.
3+
load("@rules_python//python:py_binary.bzl", "py_binary")
4+
load("@rules_python//python:py_library.bzl", "py_library")
5+
load("@rules_python//python:py_test.bzl", "py_test")
36

47
package(default_visibility = ["//tensorboard:internal"])
58

tensorboard/data/server/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_python//python:py_binary.bzl", "py_binary")
2+
load("@rules_python//python:py_test.bzl", "py_test")
13
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_doc", "rust_doc_test", "rust_library", "rust_test")
24

35
package(default_visibility = ["//tensorboard:internal"])

0 commit comments

Comments
 (0)