Migrated from https://github.com/tensorflow/tensorflow/issues/7631
I have a number of scalars that I plot in tensorboard that are non negative values (ie accuracy, etc). It would be cool if there was a quick way to have the y axis start at 0 rather than allocating unused space in the negative y direction.
I think the right way to do this would be to add another argument to the scalar_summary:
tb.plugins.scalar.summary(name, value, ... , y_axis=[0, None])
y_axis would take a tuple of numbers, where None means default behavior, and a number means fix the bound to that exact number. The first number would be the lower bound, the second would be the upper bound.
Oh, and the extra argument would get proxied to the scalars plugin via SummaryMetadata. Note we still need to get support for SummaryMetadata into released TensorFlow (right now it is in HEAD but not 1.2).
@dandelionmane
May I try this issue? I'll follow your suggestions above.
Sure. Just so you know, it will probably be a tricky change that will require a few iterations to get right.
Here are the steps, (can be done in different order):
@wchargin your thoughts are appreciated too
Would it be sufficient to add a toggle on the frontend? You could output the exact same summary data and just select at viewing time what axis behavior you want. If you're okay with doing this each time you launch the instance, it could be a better solution鈥攎uch easier to implement, doesn't require changing TF goldens, etc.
The work items would be
vz-line-chart so that there is a setting for explicitly configuring the _y_ scale domain.tf-option-selector (or similar) to the tf-scalar-dashboard, and thread the output through to the tf-scalar-chart and vz-line-chart.Hmm, William's solution is indeed a lot easier to implement.
One thing we could do is have it be a per-chart setting, with a toggle a-la "toggleLogScale" button.
Then, if down the road we want to have it be configurable at the tf.summary level, we can re-use the work of building the setting with button, and add wiring to the backend. But it would be a lot easier to implement it as a frontend-only feature to start.
@chris-chris what do you think?
Also a good idea. Adding it as a per-chart setting would be even easier to implement than having it be a global setting, and鈥攏ow that you mention it鈥攊s probably a better idea, anyway: we shouldn't force all your scalars to have the same window.
@dandelionmane @wchargin
Per-chart setting looks great. And I'll make it frontend-only feature first.
Thank you for your guidance and useful advice.
Related #710
Please note that it is common to have multiple graphs (e.g. scalars) that are expected to be aligned to the same Y axis values.
Setting a front-end-only option, means that one is required to mark those graphs again and again, every time he loads the boards.
It is possible, of course, to save those flags locally.
Any updates on this?
No updates to report. We've had some other related questions about being able to customize the axis ranges (or "lock" them to be the same across charts) so I think we'd want to address this as part of a holistic improvement there.
Most helpful comment
I think the right way to do this would be to add another argument to the scalar_summary:
tb.plugins.scalar.summary(name, value, ... , y_axis=[0, None])y_axis would take a tuple of numbers, where None means default behavior, and a number means fix the bound to that exact number. The first number would be the lower bound, the second would be the upper bound.