Skip to content

Commit ae63f39

Browse files
authored
Updates import and BUILD dependency in test from example (#6531)
## Motivation for features / changes I expect the behavior for relative imports changed after the python rule changed in #6495, and made this test fail, so it now needs to be an absolute import. (Unsure of why this was not making CI fail... maybe this particular target is not run as part of CI, since it's just an example.) ## Technical description of changes Adds a BUILD target for the submodule that was previously imported with a relative import. With the BUILD target and the dependency, the module can now be referenced as an absolute import. ## Screenshots of UI changes (or N/A) N/A ## Detailed steps to verify changes work correctly (as executed by you) Tests that were previously failing now pass. ## Alternate designs / implementations considered (or N/A) N/A
1 parent 3834689 commit ae63f39

File tree

3 files changed

+18
-1
lines changed
  • tensorboard/examples/plugins/example_raw_scalars

3 files changed

+18
-1
lines changed

tensorboard/examples/plugins/example_raw_scalars/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ py_test(
4343
tags = ["support_notf"],
4444
deps = [
4545
"//tensorboard",
46+
"//tensorboard/examples/plugins/example_raw_scalars/tensorboard_plugin_example_raw_scalars:plugin",
4647
],
4748
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Description:
2+
# An example plugin.
3+
load("@rules_python//python:py_library.bzl", "py_library")
4+
5+
package(default_visibility = ["//tensorboard:internal"])
6+
7+
licenses(["notice"])
8+
9+
py_library(
10+
name = "plugin",
11+
srcs = ["plugin.py"],
12+
srcs_version = "PY3",
13+
visibility = ["//visibility:public"],
14+
)

tensorboard/examples/plugins/example_raw_scalars/test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
from werkzeug import wrappers
2424

2525
from tensorboard.plugins import base_plugin
26-
from tensorboard_plugin_example_raw_scalars import plugin
26+
from tensorboard.examples.plugins.example_raw_scalars.tensorboard_plugin_example_raw_scalars import (
27+
plugin,
28+
)
2729

2830

2931
def is_path_safe(path):

0 commit comments

Comments
 (0)