Skip to content

Conversation

@wchargin
Copy link
Contributor

@wchargin wchargin commented Sep 3, 2019

Test Plan:
Visit http://localhost:6006/?experiment=foo#scalars, check the “Show
data download links” box, select a run from the dropdown, and verify
that the “CSV” and “JSON” links have &experiment=foo query parameters.

wchargin-branch: scalars-xid-download

Test Plan:
Visit <http://localhost:6006/?experiment=foo#scalars>, check the “Show
data download links” box, select a run from the dropdown, and verify
that the “CSV” and “JSON” links have `&experiment=foo` query parameters.

wchargin-branch: scalars-xid-download
@wchargin wchargin requested a review from nfelt September 3, 2019 19:54
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.

Nice catch!

@wchargin wchargin merged commit 81c3d75 into master Sep 4, 2019
@wchargin wchargin deleted the wchargin-scalars-xid-download branch September 4, 2019 03:51
wchargin added a commit that referenced this pull request Oct 6, 2019
Summary:
This commit changes the frontend experiment ID plumbing from using the
query string to using a path component: experiment URLs are now of the
form `http://localhost:6006/experiment/123/`. This supersedes the
short-term changes from #2580, #2613, and #2627.

Test Plan:
Apply the below patch to the multiplexer data provider, then launch
TensorBoard with `--generic_data=true` and verify that the correct
experiment ID is printed for each call, at `/` and at `/experiment/123`.
Verify also that no request has an `experiment` query parameter. Patch:

```diff
diff --git a/tensorboard/backend/event_processing/data_provider.py b/tensorboard/backend/event_processing/data_provider.py
index 0b354aa..1c00b930 100644

wchargin-source: c5b1a893a67cb82286f9de0f5b2a0638dc372a54
--- a/tensorboard/backend/event_processing/data_provider.py
+++ b/tensorboard/backend/event_processing/data_provider.py
@@ -57,10 +57,12 @@ class MultiplexerDataProvider(provider.DataProvider):
       return None

   def data_location(self, experiment_id):
+    logger.warn("data_location(%r)", experiment_id)
     del experiment_id   # ignored
     return str(self._logdir)

   def list_runs(self, experiment_id):
+    logger.warn("list_runs(%r)", experiment_id)
     del experiment_id  # ignored for now
     return [
         provider.Run(
@@ -72,6 +74,7 @@ class MultiplexerDataProvider(provider.DataProvider):
     ]

   def list_scalars(self, experiment_id, plugin_name, run_tag_filter=None):
+    logger.warn("list_scalars(%r, ...)", experiment_id)
     del experiment_id  # ignored for now
     run_tag_content = self._multiplexer.PluginRunToTagToContent(plugin_name)
     result = {}
@@ -103,6 +106,7 @@ class MultiplexerDataProvider(provider.DataProvider):
   def read_scalars(
       self, experiment_id, plugin_name, downsample=None, run_tag_filter=None
   ):
+    logger.warn("read_scalars(%r, ...)", experiment_id)
     # TODO(@wchargin): Downsampling not implemented, as the multiplexer
     # is already downsampled. We could downsample on top of the existing
     # sampling, which would be nice for testing.
```

wchargin-branch: eid-frontend
wchargin added a commit that referenced this pull request Oct 8, 2019
Summary:
This commit changes the frontend experiment ID plumbing from using the
query string to using a path component: experiment URLs are now of the
form `http://localhost:6006/experiment/123/`. This supersedes the
short-term changes from #2580, #2613, and #2627.

Test Plan:
Apply the below patch to the multiplexer data provider, then launch
TensorBoard with `--generic_data=true` and verify that the correct
experiment ID is printed for each call, at `/` and at `/experiment/123`.
Verify also that no request has an `experiment` query parameter. Patch:

```diff
diff --git a/tensorboard/backend/event_processing/data_provider.py b/tensorboard/backend/event_processing/data_provider.py
index 0b354aa..1c00b930 100644
--- a/tensorboard/backend/event_processing/data_provider.py
+++ b/tensorboard/backend/event_processing/data_provider.py
@@ -59,2 +59,3 @@ class MultiplexerDataProvider(provider.DataProvider):
   def data_location(self, experiment_id):
+    logger.warn("data_location(%r)", experiment_id)
     del experiment_id   # ignored
@@ -63,2 +64,3 @@ class MultiplexerDataProvider(provider.DataProvider):
   def list_runs(self, experiment_id):
+    logger.warn("list_runs(%r)", experiment_id)
     del experiment_id  # ignored for now
@@ -74,2 +76,3 @@ class MultiplexerDataProvider(provider.DataProvider):
   def list_scalars(self, experiment_id, plugin_name, run_tag_filter=None):
+    logger.warn("list_scalars(%r, ...)", experiment_id)
     del experiment_id  # ignored for now
@@ -105,2 +108,3 @@ class MultiplexerDataProvider(provider.DataProvider):
   ):
+    logger.warn("read_scalars(%r, ...)", experiment_id)
     # TODO(@wchargin): Downsampling not implemented, as the multiplexer
```

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants