Commit 514bbfb
projector: Fix standalone vz_projector server. (tensorflow#6069)
See: tensorflow#6065
We document the ability to run the projector plugin in standalone mode:
https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/projector/README.md
But it doesn't work.
The first thing to fix is to get the ":standalone" target to be
executable and bring up a working server:
* Hard to know exactly where things went wrong. I have found evidence
that this worked as late as
[September 2020](tensorflow#4158).
I suspect things went wrong in
[April 2021](https://github.com/tensorflow/tensorboard/pull/4906/files),
when tensorboard_html_binary() was replaced by tb_combine_html().
* In the case of vz_projector it seems we can just delete the current
":standalone" target and rename the ":standalone_lib" target to
":standalone". tb_combine_html() doesn't seem to be necessary for any
part of the build. tf_web_library() produces an executable web server
(Amazing! Who knew?).
The second thing to fix is to get it to render a working page.
* As is, the page would wail with the error message "Cannot read
properties of null (reading 'appendChild')". In this case, the null
property is `document.body`.
* Again, not really sure where things went wrong but this is probably
also related to the changes in April 2021.
* The fix here is to load the js binary in the `body` tag (much like we
do for `//tensorboard` target).
The third thing to fix is to get a constant port of "6006".
* As is, the web server would start up with random ports.
* The relevant change here is
tensorflow#3047, where port is
set to '0'. But the reason for that change is no longer relevant - the
test infrastructure the change was supporting has all been deleted.
* The fix is to change the port for the web server back to '6006'.1 parent 4a8682e commit 514bbfb
File tree
4 files changed
+7
-17
lines changed- tensorboard
- defs
- plugins/projector
- tf_projector_plugin
- vz_projector
4 files changed
+7
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 127 | | |
138 | 128 | | |
139 | 129 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments