Commit 1cf0393
committed
core: dump some debug info in
Summary:
In #4751, we implemented `data_location` support for RustBoard, which
means that the location no longer includes the gRPC address. But while
this is an improvement for users, the address was convenient for
development, and there’s no other way to get it from the UI. This patch
augments `/data/environment` to dump some basic debug info: the
TensorBoard version, the data provider, and the command-line flags.
This behavior can be turned off. It’s enabled in `tensorboard(1)`, but
disabled by default on the `CorePlugin` and `CorePluginLoader` APIs.
Thus, users who build their own TensorBoards will not find themselves
unexpectedly leaking information about their setup. For normal users of
`tensorboard(1)`, the flags are fine to render; the only potentially
sensitive thing is the logdir path, which is of course already
prominent.
Sample response, passed through `jq .`:
```
{
"data_location": "logs/mnist/",
"window_title": "",
"debug": {
"version": "2.5.0a0",
"data_provider": "GrpcDataProvider(addr='localhost:42127')",
"flags": {
"logdir": "logs/mnist/",
"logdir_spec": "",
"host": null,
"bind_all": true,
"port": null,
"reuse_port": false,
"load_fast": true,
"grpc_creds_type": "local",
"grpc_data_provider": "",
"purge_orphaned_data": true,
"db": "",
"db_import": false,
"inspect": false,
"version_tb": false,
"tag": "",
"event_file": "",
"path_prefix": "",
"window_title": "",
"max_reload_threads": 1,
"reload_interval": 5,
"reload_task": "auto",
"reload_multifile": null,
"reload_multifile_inactive_secs": 86400,
"generic_data": "auto",
"samples_per_plugin": {
"scalars": 0,
"images": 0
},
"custom_predict_fn": "",
"wit_data_dir": "",
"__tensorboard_subcommand": "serve"
}
}
}
```
Test Plan:
Manually navigated to `/data/environment` and verified that the flags
render and the data provider appears for both `--load_fast` and the
legacy multiplexer. Checked that when the change to `default.py` is
reverted, no debug data shows up.
wchargin-branch: environment-debug-info
wchargin-source: 772a3783d6f19e4060b37fe43076b963cfd8d96e/data/environment
1 parent 7258367 commit 1cf0393
File tree
6 files changed
+68
-10
lines changed- tensorboard
- backend/event_processing
- data
- plugins/core
6 files changed
+68
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
58 | 63 | | |
| 64 | + | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
165 | 172 | | |
166 | 173 | | |
167 | 174 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
196 | 203 | | |
197 | 204 | | |
198 | 205 | | |
199 | 206 | | |
200 | 207 | | |
201 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
202 | 229 | | |
203 | 230 | | |
204 | 231 | | |
| |||
270 | 297 | | |
271 | 298 | | |
272 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
273 | 303 | | |
274 | 304 | | |
275 | 305 | | |
| |||
640 | 670 | | |
641 | 671 | | |
642 | 672 | | |
643 | | - | |
| 673 | + | |
644 | 674 | | |
645 | 675 | | |
646 | 676 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
193 | 214 | | |
194 | 215 | | |
195 | 216 | | |
| |||
0 commit comments