Skip to content

Commit 33abcb5

Browse files
authored
fix(wit): Redirect WIT plugin to LIT (#6343)
The WIT is no longer actively maintained, so redirect users to install and use the newer [Learning Interoperability Tool (LIT)](https://pair-code.github.io/lit/) instead via a dynamic plugin. I attempted to get the WIT package building again to push out an updated release that does this redirection outside of the TB code, but that proved more difficult than expected. The resulting dashboard can be seen below, which links to the [LIT homepage](https://pair-code.github.io/lit/) and [setup guide](https://pair-code.github.io/lit/setup/), respectively. ![image](https://user-images.githubusercontent.com/13921855/234000839-7affc80a-dc89-478f-8a9e-98e5522cc456.png) Contributes to #6195
1 parent a9734f8 commit 33abcb5

File tree

14 files changed

+281
-18
lines changed

14 files changed

+281
-18
lines changed

docs/what_if_tool.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Model Understanding with the What-If Tool Dashboard
22

3+
> **Warning**
4+
> This documentation only applies to TensorBoard 2.11 and earlier, as the
5+
> What-If Tool is no longer actively maintained. Please check out the actively
6+
> maintained [Learning Interpretability Tool
7+
> (LIT)](https://pair-code.github.io/lit/) instead.
8+
39
![What-If Tool](./images/what_if_tool.png)
410

511
The What-If Tool (WIT) provides an easy-to-use interface for expanding

tensorboard/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ py_library(
320320
"//tensorboard/plugins/profile_redirect:profile_redirect_plugin",
321321
"//tensorboard/plugins/scalar:scalars_plugin",
322322
"//tensorboard/plugins/text:text_plugin",
323+
"//tensorboard/plugins/wit_redirect:wit_redirect_plugin",
323324
],
324325
)
325326

tensorboard/components/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ tf_ts_library(
2121
"//tensorboard/plugins/profile_redirect/tf_profile_redirect_dashboard",
2222
"//tensorboard/plugins/scalar/tf_scalar_dashboard",
2323
"//tensorboard/plugins/text/tf_text_dashboard",
24+
"//tensorboard/plugins/wit_redirect/tf_wit_redirect_dashboard",
2425
],
2526
)
2627

tensorboard/components/polymer3_lib.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ import '../plugins/profile_redirect/tf_profile_redirect_dashboard/tf-profile-red
2626
import '../plugins/pr_curve/tf_pr_curve_dashboard/tf-pr-curve-dashboard';
2727
import '../plugins/scalar/tf_scalar_dashboard/tf-scalar-dashboard';
2828
import '../plugins/text/tf_text_dashboard/tf-text-dashboard';
29+
import '../plugins/wit_redirect/tf_wit_redirect_dashboard/tf-wit-redirect-dashboard';
2930
import './polymer3_interop_helper';

tensorboard/default.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from tensorboard.plugins.scalar import scalars_plugin
4545
from tensorboard.plugins.text import text_plugin
4646
from tensorboard.plugins.mesh import mesh_plugin
47+
from tensorboard.plugins.wit_redirect import wit_redirect_plugin
4748

4849

4950
logger = logging.getLogger(__name__)
@@ -67,6 +68,7 @@
6768
profile_redirect_plugin.ProfileRedirectPluginLoader,
6869
hparams_plugin.HParamsPlugin,
6970
mesh_plugin.MeshPlugin,
71+
wit_redirect_plugin.WITRedirectPluginLoader,
7072
]
7173

7274

tensorboard/pip_package/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,5 @@ protobuf >= 3.19.6
3030
requests >= 2.21.0, < 3
3131
setuptools >= 41.0.0 # Note: provides pkg_resources as well as setuptools
3232
tensorboard-data-server >= 0.7.0, < 0.8.0
33-
tensorboard-plugin-wit >= 1.6.0
3433
werkzeug >= 1.0.1
3534
wheel >= 0.26
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# What-If Tool
22

3+
> **Warning**
4+
> The What-If Tool is no longer actively maintained. Please use the actively
5+
> maintained [Learning Interpretability Tool (LIT)](https://pair-code.github.io/lit/)
6+
> instead.
7+
38
The What-If Tool code and documentation has moved to https://github.com/pair-code/what-if-tool.
49

510
The What-If Tool TensorBoard plugin has been converted to a dynamic plugin, through the tensorboard-plugin-wit pip package.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Description:
2+
# Plugin with installation instructions for dynamic interpretability plugin
3+
4+
package(default_visibility = ["//tensorboard:internal"])
5+
6+
licenses(["notice"])
7+
8+
py_library(
9+
name = "wit_redirect_plugin",
10+
srcs = ["wit_redirect_plugin.py"],
11+
srcs_version = "PY3",
12+
deps = [
13+
"//tensorboard/plugins:base_plugin",
14+
],
15+
)
16+
17+
py_test(
18+
name = "wit_redirect_plugin_test",
19+
srcs = ["wit_redirect_plugin_test.py"],
20+
srcs_version = "PY3",
21+
deps = [
22+
":wit_redirect_plugin",
23+
"//tensorboard:test",
24+
"//tensorboard/plugins:base_plugin",
25+
],
26+
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ==============================================================================
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
load("//tensorboard/defs:defs.bzl", "tf_ts_library")
2+
3+
package(default_visibility = ["//tensorboard:internal"])
4+
5+
licenses(["notice"])
6+
7+
tf_ts_library(
8+
name = "tf_wit_redirect_dashboard",
9+
srcs = ["tf-wit-redirect-dashboard.ts"],
10+
strict_checks = False,
11+
deps = [
12+
"//tensorboard/components/polymer:irons_and_papers",
13+
"//tensorboard/components/polymer:legacy_element_mixin",
14+
"@npm//@polymer/decorators",
15+
"@npm//@polymer/polymer",
16+
],
17+
)

0 commit comments

Comments
 (0)