Skip to content

Scalar plugin download links should work in Colab #1845

@wchargin

Description

@wchargin

Currently, the scalar plugin download links use <a href download>,
where the href points to a route on the TensorBoard backend. This
works fine locally, but on Colab requests to the backend are mediated by
a service worker, and the service worker does not appear to intercept
these requests. Consequently, downloads fail with a “network error”.

Proposed fix (to apply to Colab contexts only): When a run is selected
from the “run to download” dropdown menu, instead of updating the href
property of the links, send off two asynchronous fetch requests: one
to the CSV data and one to the JSON data. As these resolve, update the
hrefs to point to data URLs/blob URLs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions