KEMBAR78
Remove functionality of legacy DB mode by wchargin · Pull Request #3539 · tensorflow/tensorboard · GitHub
Skip to content

Conversation

@wchargin
Copy link
Contributor

@wchargin wchargin commented Apr 22, 2020

Summary:
TensorBoard typically reads from a logdir on disk, but the --db_import
and --db flags offered an experimental SQLite-backed read path. This
DB mode has always been clearly marked as experimental, and does not
work as advertised. For example, runs were broken in all dashboards.
A data set with n runs at top level would show as n runs in
TensorBoard, but all of them would have the name . and the same color,
and only one of them would actually render data. The images dashboard
was also completely broken and did not show images. And lots of plugins
just didn’t support DB mode at all. Furthermore, the existence of DB
mode is an active impediment to maintenance, and also accounts for some
of the few remaining test cases that require TensorFlow 1.x to run.

This patch removes support for DB mode from all plugins, removes the
db_connection_provider field from TBContext, and renders the --db
and --db_import flags functionally inoperative. The plumbing itself
will be removed in a separate commit; a modicum of care is required for
the TensorBoardInfo struct.

Test Plan:
Running with a standard demo logdir, TensorBoard still works fine with
both --generic_data false and --generic_data true.

wchargin-branch: nodb-functionality

Summary:
TensorBoard typically reads from a logdir on disk, but the `--db_import`
and `--db` flags offered an experimental SQLite-backed read path. This
DB mode has always been clearly marked as experimental, and does not
work as advertised. For example, runs were broken in all dashboards.
A data set with *n* runs would show as *n* runs in TensorBoard, but all
of them would have the name `.` and the same color, and only one of them
would actually render data. The images dashboard was also completely
broken and did not show images. And lots of plugins just didn’t support
DB mode at all. Furthermore, the existence of DB mode is an active
impediment to maintenance, and also accounts for some of the few
remaining test cases that require TensorFlow 1.x to run.

This patch removes support for DB mode from all plugins, removes the
`db_connection_provider` field from `TBContext`, and renders the `--db`
and `--db_import` flags functionally inoperative. The plumbing itself
will be removed in a separate commit; a modicum of care is required for
the `TensorBoardInfo`  struct.

Test Plan:
Running with a standard demo logdir, TensorBoard still works fine with
both `--generic_data false` and `--generic_data true`.

wchargin-branch: nodb-functionality
"No histogram tag %r for run %r" % (tag, run)
)
(tag_id,) = row
# Fetch tensor values, optionally with linear-spaced sampling by step.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIP cool linear sampling SQL query, 2018–2020.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💔⚰️

Copy link
Contributor

@nfelt nfelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! 💯✖️🥝

DB mode has always been clearly marked as experimental, and does not
work as advertised. For example, runs were broken in all dashboards.
A data set with n runs would show as n runs in TensorBoard, but all
of them would have the name . and the same color, and only one of them
would actually render data.

For posterity, not to defend this from a UX standpoint, but I think this was because the DB mode "logic" was to treat each top-level subdirectory of the logdir as an "experiment", in which runs were separately namespaced, which is why all the runs show up as .. Basically to make it look right you had to use --logdir_spec to pass in something like exp1:/tmp/exp1,exp2:/tmp/exp2.

"No histogram tag %r for run %r" % (tag, run)
)
(tag_id,) = row
# Fetch tensor values, optionally with linear-spaced sampling by step.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💔⚰️

function is cheap. The returned connection must only be used by a
single thread. Things like connection pooling are considered
implementation details of the provider.
db_uri: The string db URI TensorBoard was started with. If this is set,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should db_uri also be removed here, or is it being used in the manager code somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep; thanks. Done.

wchargin-branch: nodb-functionality
wchargin-source: 8df9359e969a0291beb459fa2ed49a97a3050f47
Copy link
Contributor Author

@wchargin wchargin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I half-remembered that there was something like this, but couldn’t
remember the details. Thanks; updated the wording a bit.

Test sync passes, so I’m going to merge this.

function is cheap. The returned connection must only be used by a
single thread. Things like connection pooling are considered
implementation details of the provider.
db_uri: The string db URI TensorBoard was started with. If this is set,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep; thanks. Done.

@wchargin wchargin merged commit e0aaf64 into master Apr 23, 2020
@wchargin wchargin deleted the wchargin-nodb-functionality branch April 23, 2020 17:28
caisq pushed a commit to caisq/tensorboard that referenced this pull request May 19, 2020
Summary:
TensorBoard typically reads from a logdir on disk, but the `--db_import`
and `--db` flags offered an experimental SQLite-backed read path. This
DB mode has always been clearly marked as experimental, and does not
work as advertised. For example, runs were broken in all dashboards.
A data set with *n* runs at top level would show as *n* runs in
TensorBoard, but all of them would have the name `.` and the same color,
and only one of them would actually render data. The images dashboard
was also completely broken and did not show images. And lots of plugins
just didn’t support DB mode at all. Furthermore, the existence of DB
mode is an active impediment to maintenance, and also accounts for some
of the few remaining test cases that require TensorFlow 1.x to run.

This patch removes support for DB mode from all plugins, removes the
`db_connection_provider` field from `TBContext`, and renders the `--db`
and `--db_import` flags functionally inoperative. The plumbing itself
will be removed in a separate commit; a modicum of care is required for
the `TensorBoardInfo`  struct.

Test Plan:
Running with a standard demo logdir, TensorBoard still works fine with
both `--generic_data false` and `--generic_data true`.

wchargin-branch: nodb-functionality
caisq pushed a commit that referenced this pull request May 27, 2020
Summary:
TensorBoard typically reads from a logdir on disk, but the `--db_import`
and `--db` flags offered an experimental SQLite-backed read path. This
DB mode has always been clearly marked as experimental, and does not
work as advertised. For example, runs were broken in all dashboards.
A data set with *n* runs at top level would show as *n* runs in
TensorBoard, but all of them would have the name `.` and the same color,
and only one of them would actually render data. The images dashboard
was also completely broken and did not show images. And lots of plugins
just didn’t support DB mode at all. Furthermore, the existence of DB
mode is an active impediment to maintenance, and also accounts for some
of the few remaining test cases that require TensorFlow 1.x to run.

This patch removes support for DB mode from all plugins, removes the
`db_connection_provider` field from `TBContext`, and renders the `--db`
and `--db_import` flags functionally inoperative. The plumbing itself
will be removed in a separate commit; a modicum of care is required for
the `TensorBoardInfo`  struct.

Test Plan:
Running with a standard demo logdir, TensorBoard still works fine with
both `--generic_data false` and `--generic_data true`.

wchargin-branch: nodb-functionality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants