我需要一个自定义的Runs Selector组件,该组件将允许取消Tensorboard上看起来不太理想的Slurm训练作业。我需要在“运行选择器”的每次运行之前添加一个“取消”按钮。我已经弄清楚了如何将AJAX请求发送到服务器以及如何在服务器上的Python脚本中处理它。
看来我需要实现一个插件,复制并修改tf_runs_selector Tensorboard组件,并将其作为插件的一部分。 我尝试使用greeter_plugin示例作为插件的原型。我从Tensorboard复制了tf_runs_selector目录,并将其放在插件目录下(我将tf_runs_selector重命名为my_runs_selector,并将tf-runs-selector.html重命名为my-runs-selector.html)。现在,我具有以下目录结构:
~/tensorboard_plugin_example
greeter_plugin
BUILD
(other files)
my_runs_selector
BUILD
my-runs-selector.html
我用my_runs_selector / BUILD文件中“ tf_runs_selector”和“ tf-runs-selector”中的“ my”前缀替换了“ tf”修复,并删除了
"@org_tensorflow_tensorboard//tensorboard/components/tf_paginated_view",
来自greeter_plugin / BUILD文件 。 这是my_runs_selector子目录中BUILD文件的内容:
package(default_visibility = ["//visibility:public"])
load("//tensorboard/defs:web.bzl", "tf_web_library")
licenses(["notice"]) # Apache 2.0
tf_web_library(
name = "my_runs_selector",
srcs = ["my-runs-selector.html"],
path = "/my-runs-selector",
visibility = ["//visibility:public"],
deps = [
"//tensorboard/components/tf_backend",
"//tensorboard/components/tf_color_scale",
"//tensorboard/components/tf_dashboard_common",
"//tensorboard/components/tf_imports:polymer",
"@org_polymer_paper_button",
"@org_polymer_paper_dialog",
"@org_polymer_paper_styles",
],
)
但是当我尝试构建自定义张量板时,出现以下错误:
ERROR: greeter_plugin/greeter-dashboard.html: Referenced my_runs_selector/my-runs-selector.html (/greeter-plugin/my_runs_selector/my-runs-selector.html) without depending on a web_library() rule providing it
NOTE: Use suppress=["strictDependencies"] to make the errors above warnings
Target //greeter_tensorboard:greeter_tensorboard failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /home/tkapustin/tensorboard-plugin-example/greeter_tensorboard/BUILD:56:1 Checking webfiles //greeter_plugin:greeter_dashboard failed (Exit 1)
INFO: Elapsed time: 0.314s, Critical Path: 0.09s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
所以我的问题是:
能够使用自定义的my_runs_selector组件构建我的插件?