Closed stared closed 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 ?
@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.
@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...
@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)
I have opened the FR (link) and I am interested in possible contribution. We can iterate there :+1:
Directly stolen from https://github.com/pytorch/ignite (thx @vfdev-5!).