-
Notifications
You must be signed in to change notification settings - Fork 37
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
log_plot(): add custom line plot #271
Comments
Could you clarify more what kind of plot you would like or give an example? |
Although I have a specific line plot in mind, I've tried to be as generic as possible because this is not really relevant for what I'm proposing. In simple terms, the user would just need to specify two arrays (in a json file I guess), one for the x and one for the y coordinates of the points in a line plot (in my specific case the x values would always be the same, but they could change too, I don't expect this to be requirement). I haven't used the available options for |
We would need to change the current API of We currently use y_true = [0, 0, 1, 1]
y_score = [0.1, 0.4, 0.35, 0.8]
live.log_plot("calibration", y_true, y_score)
If we add support to this, I assume that it would make sense to support arbitrary names.
x = [0, 1, 2]
y = [0.1, 0.2, 0.3]
live.log_plot(x, y, name="foo", tempalte="linear") |
My two cents on the API, admitting that I haven't seen the DVC code yet, but just trying to minimize the changes, more importantly the breaking ones: how about just adding a new If |
Related: #322 (comment). Based on that discussion, it probably makes more sense to introduce a separate method here like It should handle tabular (dataframe/array/tensor) or hierarchical (dict) input data (although output format could all be JSON if it's easier). Or saving the data could be separate from the plotting like in wandb. This seems a little less straightforward to me but would better support flexible plots where you want to make multiple plots from the same data source or combined data sources. This might be a stretch for 1.0, but it would be nice to have since it sort of completes the dvc integration of being able to log any kind of dvc output from dvclive. Like the existing |
An additional argument towards a separate command is that, in the current sklearn plots, the inputs don't match what gets saved in the plot: (y_true, y_pred) gets transformed to some (x, y) depending on each plot. |
Create DVC plots from datapoints (list of dictionaries) and plot config. Closes #271 Closes #453 ``` datapoints = [{"foo": 1, "bar": 2}, {"foo": 3, "bar": 4}] with Live() as live: live.log_plot("foo_default", datapoints, x="foo", y="bar") live.log_plot( "foo_scatter", datapoints, x="foo", y="bar", template="scatter", ) ```
Create DVC plots from datapoints (list of dictionaries) and plot config. Closes #271 Closes #453 ``` datapoints = [{"foo": 1, "bar": 2}, {"foo": 3, "bar": 4}] with Live() as live: live.log_plot("foo_default", datapoints, x="foo", y="bar") live.log_plot( "foo_scatter", datapoints, x="foo", y="bar", template="scatter", ) ```
During my evaluation stage, I plot a simple line plot where the x values are predefined, and the y values are calculated from truth and predicted values, and are informative of the model performance.
I'd love to see how the line plot changes from experiment to experiment, which means that I'd like to use
log_plot
for doing this.Would it be possible to implement such a feature? It seems to me that
log_plot
offers advanced features (ROC etc) but not a simple one like this.The text was updated successfully, but these errors were encountered: