Closed vfdev-5 closed 4 years ago
I considered that, but prefer to avoid extraneous syntax. Especially in a situation when if we want custom outputs, usually we want custom outputs (e.g. special path to TensorboardLogger
).
If the problem is with extra import line, would the following (not yet implemented) work for you:
from livelossplot import PlotLosses
plotlosses = PlotLosses(outputs=[])
plotlosses.add_matplotlib()
plotlosses.add_tensorboard()
OK, I see. Maybe, either like this:
from livelossplot import PlotLosses
plotlosses = PlotLosses().add_matplotlib().add_tensorboard()
I am a big fan of chaining, so I like it.
Now I see that .to_
may be more descriptive than .add_
.
@vfdev-5 Merged (will be released with livelossplot >0.5.2
):
PlotLosses(outputs=['MatplotlibPlot', 'TensorboardLogger'])
in case we use default parametersPlotLosses(outputs=[]).to_matplotlib(...).to_tensorboard(...)
if we want to use custom parameters but don't want an extra import line Looks nice, thanks !
OK, we released 0.5.3
.
🚀 Feature
Just to improve user's experience with this part of code:
outputs=[MatplotlibPlot(), TensorboardLogger()] plotlosses = PlotLosses(outputs=outputs)
@stared what do you think ?