stared / livelossplot

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

feat(github) issue templates #105

Closed stared closed 4 years ago

stared commented 4 years ago

Directly stolen from https://github.com/pytorch/ignite (thx @vfdev-5!).

vfdev-5 commented 4 years ago

@stared didn't know about your package. Looks cool ! Just saw the example with ignite and ask myself if we could not make a more generic matplotlib logger of any variable. We can then put it into contrib with dependency on your package. What do you think ?

stared commented 4 years ago

@vfdev-5 Sure, if you used livelossplot inside Ignite, I would be delighted!

Ignite code & example is by @Bartolo1024.

Let me know if you have any questions.

vfdev-5 commented 4 years ago

@stared, actually, the name PlotLosses* does not mean plotting only loss values, right ? Is itpossible to log: lr, running avg batch loss(es), maybe other things in addition to metrics what is done in Ignite example ?

I can open an issue in ignite with a FR to setup LivelossplotLogger (similar to other loggers we have) and we can also iterate there, if you guys are interested...

Bartolo1024 commented 4 years ago

@vfdev-5 It is possible to log every float value in PlotLosses. You have to only specify groups or group patterns if you want to use it with some of the available plugins (for ex. matplotlib plots).

groups = {'acccuracy': ['acc', 'val_acc'], 'log-loss': ['loss', 'val_loss'], 'lr': ['lr']}
plotlosses = PlotLosses(groups=groups)

for i in range(10):
    logs = {
        'acc': 1 - np.random.rand() / (i + 2.),
        'val_acc': 1 - np.random.rand() / (i + 0.5),
        'loss': 1. / (i + 2.),
        'val_loss': 1. / (i + 0.5)
    }
    logs['lr'] = 0.1 / 2 ** (i // 5)
    plotlosses.update(logs)
    plotlosses.send()
    sleep(.1)

image I have opened the FR (link) and I am interested in possible contribution. We can iterate there :+1: