Skip to content

Commit e3340ad

Browse files
authored
Add projector module API to pip package (#934)
Fix #926 by explicitly including the projector module API, i.e. `import tensorboard.plugins.projector`, which provides access to `visualize_embeddings`, when building the pip package.
1 parent bf0ded2 commit e3340ad

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tensorboard/pip_package/BUILD

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Description:
2-
# Tools for building the TensorFlow pip package.
2+
# Tools for building the TensorBoard pip package.
33

44
package(default_visibility = ["//visibility:private"])
55

@@ -14,8 +14,13 @@ sh_binary(
1414
"README.rst",
1515
"setup.cfg",
1616
"setup.py",
17+
# Main tensorboard binary and everything it uses
1718
"//tensorboard",
19+
# User-facing python library ('import tensorboard')
1820
"//tensorboard:lib",
21+
# Version module (read by setup.py)
1922
"//tensorboard:version",
23+
# User-facing projector API ('import tensorboard.plugins.projector')
24+
"//tensorboard/plugins/projector",
2025
],
2126
)

tensorboard/pip_package/pip_smoke_test.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,12 @@ echo
127127
# Check that we can now use TensorBoard's public python APIs as installed with
128128
# the pip package. To do this we must cd away from the bazel workspace directory
129129
# to one that doesn't have a local 'tensorboard' python module hierarchy.
130-
TEST_API_CALL="import tensorboard as tb; tb.summary.scalar_pb('test', 42)"
130+
TEST_API_CALL="
131+
import tensorboard as tb
132+
tb.summary.scalar_pb('test', 42)
133+
from tensorboard.plugins.projector import visualize_embeddings
134+
"
135+
131136
echo " python>>> $TEST_API_CALL"
132137
echo
133138
(cd "${VENV_TMP_DIR}" && python -c "$TEST_API_CALL")

0 commit comments

Comments
 (0)