Skip to content
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

Feature: support plotting custom curves over time #6007

Open
domef opened this issue Oct 28, 2022 · 7 comments
Open

Feature: support plotting custom curves over time #6007

domef opened this issue Oct 28, 2022 · 7 comments

Comments

@domef
Copy link

domef commented Oct 28, 2022

I need to plot custom curves that change over time (at each step I have a different curve). There is the plugin pr_curve that has this feature: you have a slider for the steps and at each step you have a different curve.
But there is a big problem, this plugin actually computes and plots only precision-recall curves. Why are these features coupled?
Is there a way to plot custom curves over time?

@yatbear
Copy link
Member

yatbear commented Oct 28, 2022

Hi @domef,

I think the Custom Scalar Dashboard is what you are looking for: https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/custom_scalar/README.md

@domef
Copy link
Author

domef commented Nov 2, 2022

This is not what I'm looking for. I need the slider of the steps so that I can see how to the curve changes over time.

@groszewn
Copy link
Contributor

groszewn commented Nov 2, 2022

One workaround would be to save the curve as an image at each step, which should allow you to step through each curve in the time series dashboard.

I will leave this issue open for others to comment or +1 and we can see if many users are asking for this feature.

@LucaBonfiglioli
Copy link

One workaround would be to save the curve as an image at each step, which should allow you to step through each curve in the time series dashboard.

I will leave this issue open for others to comment or +1 and we can see if many users are asking for this feature.

Yep, already thought of that, and in fact we are currently plotting the curves with matplotlib.pyplot and logging the figure as an image, but this practice is cursed, here is some additional motivation on why this feature may be useful to have:

  • Logging plots as images is slow, there is a 2D rendering involved.
  • It also ends up using a lot of space. A compressed image large enough to keep the charts readable is almost always orders of magnitude larger than logging a N×2 float array (unless N is huge, but you can always downsample the curves).
  • Poor GUI interaction. You cannot inspect results by panning, cropping, zooming, and neither compare the same curve across multiple runs.
  • You have to manually save the results, otherwise you cannot go back to a structured representation like CSV or JSON to perform additional analysis on logged results.
  • It looks bad, there is no visual consistency between a matplotlib figure rendering and all other plots logged with tensorboard.
  • It is essentially the same as performing version control on your software by saving screenshots of it on your instagram profile.

It also seems to me that you already have all the necessary components to easily implement the logging of custom curves. After all, you already have tools to visualize/interact with 2D plots, even plots with non-temporal values as x-axis, like in the PR curves plugin.

@groszewn groszewn changed the title How to plot custom curves? Feature: support plotting custom curves over time Nov 2, 2022
@groszewn
Copy link
Contributor

groszewn commented Nov 2, 2022

We appreciate the additional feedback, it definitely helps as we try and prioritize work. I've converted this to a feature request.

@nfelt
Copy link
Contributor

nfelt commented Nov 4, 2022

A few previous instances of this request:

Barring any objections we should probably consolidate these into a single issue for tracking. I was hoping to tackle this as part of revamping the PR curves summary API for TF 2.0 compatibility (#2902) but we didn't get that far at that point. I agree this would significantly increase the utility of the PR curves dashboard.

@Aryan9101
Copy link

What's the status of this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants