Skip to content

Conversation

wchargin
Copy link
Contributor

Summary:
Remember which runs we've fetched since the last explicit reload. If we
need to load more data, don't fetch those runs again.

More details on docstring on new property.

Test Plan:
Open the network panel. Open a category with a dozen or so tags. Then,
in the list of runs, go down the list and check each run one at a time
(starting from all disabled).

Before this change:
pre_change
You can see that the number of network requests is linear in the number
of selected runs, so the total number of requests is quadratic in the
number of selections you make.

After this change:
post_change
You can see that the number of network requests is constant in the number
of selected runs, so the total number of requests is linear in the
number of selections you make.

Also, deselecting runs now causes zero requests instead of $n$,
where $n$ is the number of runs that remain selected.

Clicking "reload" or waiting 30 seconds does issue a big blob of
requests, as desired.

wchargin-branch: scalars-remember-fetches

@wchargin wchargin requested a review from teamdandelion June 27, 2017 01:40
@wchargin wchargin force-pushed the wchargin-create-paginated-view branch 2 times, most recently from 38994ba to 1152401 Compare June 27, 2017 19:28
Summary:
Remember which runs we've fetched since the last explicit reload. If we
need to load more data, don't fetch those runs again.

More details on docstring on new property.

Test Plan:
Open the network panel. Open a category with a dozen or so tags. Then,
in the list of runs, go down the list and check each run one at a time
(starting from all disabled).

Before this change:
![pre_change](https://user-images.githubusercontent.com/4317806/27566867-cb3284f2-5a9c-11e7-8b7e-f8ec299ebcf5.png)
You can see that the number of network requests is linear in the number
of selected runs, so the total number of requests is quadratic in the
number of selections you make.

After this change:
![post_change](https://user-images.githubusercontent.com/4317806/27566871-d3704974-5a9c-11e7-9a7f-6505ce23a041.png)
You can see that the number of network requests is constant in the number
of selected runs, so the total number of requests is linear in the
number of selections you make.

Also, deselecting runs now causes zero requests instead of $n$,
where $n$ is the number of runs that remain selected.

Clicking "reload" or waiting 30 seconds does issue a big blob of
requests, as desired.

wchargin-branch: scalars-remember-fetches
@wchargin wchargin changed the base branch from wchargin-create-paginated-view to master June 27, 2017 19:50
@wchargin wchargin force-pushed the wchargin-scalars-remember-fetches branch from 367e5c9 to e2ba90d Compare June 27, 2017 19:50
@wchargin wchargin merged commit bccdb35 into master Jun 27, 2017
@wchargin wchargin deleted the wchargin-scalars-remember-fetches branch June 27, 2017 21:43
chihuahua added a commit that referenced this pull request Aug 18, 2017
Specifically, rewired the vz_line_chart component to take

- an object that configures the X axis (the specific field and scale)
- an Plottable accessor that computes the value on the Y axis
- a list of TooltipColumns that specify the columns within the table in the tooltip

Rewired scalar line charts to use the generalized logic. This change sets the stage for the PR curve plugin to also use vz_line_chart, discouraging duplicate code.

Unfortunately, by generalizing vz_line_chart instead of tf-scalar-chart.html, we do miss out on some benefits. tf-scalar-chart.html contains some logic to correct bugs in Plottable (#163, #189, #204). We should think about how to bring those benefits to other dashboards that use vz_line_chart.
chihuahua added a commit that referenced this pull request Aug 22, 2017
Specifically, rewired the vz_line_chart component to take

- an object that configures the X axis (the specific field and scale)
- an Plottable accessor that computes the value on the Y axis
- a list of TooltipColumns that specify the columns within the table in the tooltip

Rewired scalar line charts to use the generalized logic. This change sets the stage for the PR curve plugin to also use vz_line_chart, discouraging duplicate code.

Unfortunately, by generalizing vz_line_chart instead of tf-scalar-chart.html, we do miss out on some benefits. tf-scalar-chart.html contains some logic to correct bugs in Plottable (#163, #189, #204). We should think about how to bring those benefits to other dashboards that use vz_line_chart.
chihuahua added a commit that referenced this pull request Aug 25, 2017
Specifically, rewired the vz_line_chart component to take

- an object that configures the X axis (the specific field and scale)
- an Plottable accessor that computes the value on the Y axis
- a list of TooltipColumns that specify the columns within the table in the tooltip

Rewired scalar line charts to use the generalized logic. This change sets the stage for the PR curve plugin to also use vz_line_chart, discouraging duplicate code.

Unfortunately, by generalizing vz_line_chart instead of tf-scalar-chart.html, we do miss out on some benefits. tf-scalar-chart.html contains some logic to correct bugs in Plottable (#163, #189, #204). We should think about how to bring those benefits to other dashboards that use vz_line_chart.
chihuahua added a commit that referenced this pull request Sep 4, 2017
Before this change, tf-scalar-chart.html contains much logic specific to
the scalars plugin. We extract that scalars-specific logic into a new
component called tf-scalar-card. Some of the logic extracted includes
properties that allow for setting X and Y axes, the buttons under the
chart, and the callback that is run when data is received from the
server.

This change is a step towards allowing any plugin to make use of the
tf-scalar-chart component (albeit a subsequent change will move and
rename this component to clarify that it is generally applicable). That
goal is desirable because tf-scalar-chart contains a lot of logic that
corrects for bugs in the vz-line-chart component and Plottable. That
logic includes #163, #189, and #204.
chihuahua added a commit that referenced this pull request Sep 12, 2017
Before this change, tf-scalar-chart.html contains much logic specific to
the scalars plugin. We extract that scalars-specific logic into a new
component called tf-scalar-card. Some of the logic extracted includes
properties that allow for setting X and Y axes, the buttons under the
chart, and the callback that is run when data is received from the
server.

This change is a step towards allowing any plugin to make use of the
tf-scalar-chart component (albeit a subsequent change will move and
rename this component to clarify that it is generally applicable). That
goal is desirable because tf-scalar-chart contains a lot of logic that
corrects for bugs in the vz-line-chart component and Plottable. That
logic includes #163, #189, and #204.
chihuahua added a commit that referenced this pull request Sep 15, 2017
Before this change, tf-scalar-chart.html contains much logic specific to
the scalars plugin. We extract that scalars-specific logic into a new
component called tf-scalar-card. Some of the logic extracted includes
properties that allow for setting X and Y axes, the buttons under the
chart, and the callback that is run when data is received from the
server.

This change is a step towards allowing any plugin to make use of the
tf-scalar-chart component (albeit a subsequent change will move and
rename this component to clarify that it is generally applicable). That
goal is desirable because tf-scalar-chart contains a lot of fixes that
correct for bugs in the vz-line-chart component and Plottable. Those fixes
include #163, #189, and #204.
chihuahua added a commit that referenced this pull request Sep 18, 2017
We refactor the card that loads PR curves to use the
tf-line-chart-loader component. This has several major advantages,
as detailed by #163, #189, and #204.

Test plan: Note that the PR curves dashboard still WAI.
chihuahua added a commit that referenced this pull request Sep 19, 2017
We refactor the card that loads PR curves to use the
tf-line-chart-loader component. This has several major advantages,
as detailed by #163, #189, and #204.

Test plan: Note that the PR curves dashboard still WAI.
chihuahua added a commit that referenced this pull request Sep 26, 2017
We refactor the card that loads PR curves to use the
tf-line-chart-loader component. This has several major advantages,
as detailed by #163, #189, and #204.

Test plan: Note that the PR curves dashboard still WAI.
chihuahua added a commit that referenced this pull request Sep 27, 2017
Refactored the card that loads PR curves to use the
tf-line-chart-loader component. This has several major advantages,
as detailed by #163, #189, and #204.

Part of this effort involved adding defaultXRange and
defaultYRange fields to tf-line-chart-data-loader.

Test plan:
Run the scalars and PR curves demos. Merge the directories, and
start TensorBoard. Note that the scalars and PR curves dashboards
still WAI. Check that sliders and buttons work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants