stared / livelossplot

Live training loss plot in Jupyter Notebook for Keras, PyTorch and others
https://p.migdal.pl/livelossplot
MIT License
1.29k stars 143 forks source link

Make xlabel customizable #115

Closed vfdev-5 closed 4 years ago

vfdev-5 commented 4 years ago

🚀 Feature

Some time we would like to log values per iteration during the training and other values per epoch (e.g. after evaluating a model). It would be nice to have a possibility to customize x axis according to "type" of logging: per iteration or per epoch or whatever...

Currently, it seems like to be hard-coded and can not be simply modified: https://github.com/stared/livelossplot/blob/a7e30dd121425871500444ef06964e7b4b16057c/livelossplot/outputs/matplotlib_plot.py#L69

@stared @Bartolo1024 what do you, guys, think ?

Bartolo1024 commented 4 years ago

@stared maybe we should add some metadata to metrics / groups - to notify plugins about metric-wise properties like step units?

stared commented 4 years ago

@vfdev-5 So, in general, I want to make plots more customizable.

I kind of procrastinate on that because there are a few possibilities:

And on top of that, there is a long-overdue idea of switching to object-oriented API #16.

I like the idea of @Bartolo1024 to attach the x-label to groups (as plots are per group) - so one can combine per-batch and per-epoch plots.

vfdev-5 commented 4 years ago

Either solution works for as far as it show correct plots with right axes :)

stared commented 4 years ago

With 0.5.2 it is customizable, vide https://github.com/stared/livelossplot/blob/master/examples/matplotlib.ipynb, thanks to @Bartolo1024.