-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Remove functionality of legacy DB mode #3539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💔⚰️
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💔⚰️
tensorboard/plugins/base_plugin.py
Outdated
| 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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this 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.
tensorboard/plugins/base_plugin.py
Outdated
| 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep; thanks. Done.
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 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_importand
--dbflags offered an experimental SQLite-backed read path. ThisDB 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_providerfield fromTBContext, and renders the--dband
--db_importflags functionally inoperative. The plumbing itselfwill be removed in a separate commit; a modicum of care is required for
the
TensorBoardInfostruct.Test Plan:
Running with a standard demo logdir, TensorBoard still works fine with
both
--generic_data falseand--generic_data true.wchargin-branch: nodb-functionality