Closed bobloki closed 5 years ago
I'm using the tf.keras version and getting the same error:
from livelossplot.tf_keras import PlotLossesCallback
plot_losses = PlotLossesCallback()
@khalido @bobloki Thanks for reporting.
It should not require neptune (after #47 it required, but I fixed that with 7876f0690e1d4fe229ceecd696d314cb73d79855; as the general philosophy is to avoid ML packages).
I spotted an unintentional import, fixed with 090eb512f436be5f7b663aea2c4e373a62bdeec8. Installing from git should solve it. Version 0.3.3
(not yet released) should work.
@stared thank you for addressing this.
I have been having this same issue. I did try re-installing livelossplot from git, but unfortunately am still receiving this same error, even after re-starting jupyter. I will continue to search for the issue, but please do let me know if you come across anything else.
@collinp-spindance Stange. Could you share the new error message?
@stared
# to plot live loss function
from livelossplot.keras import PlotLossesCallback
plot_losses = PlotLossesCallback()
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-13-4f4ff436e080> in <module>
2 from livelossplot.keras import PlotLossesCallback
3
----> 4 plot_losses = PlotLossesCallback()
/anaconda3/lib/python3.6/site-packages/livelossplot/keras.py in __init__(self, **kwargs)
7 def __init__(self, **kwargs):
8 keras.callbacks.Callback.__init__(self)
----> 9 _PlotLossesCallback.__init__(self, **kwargs)
/anaconda3/lib/python3.6/site-packages/livelossplot/generic_keras.py in __init__(self, **kwargs)
26 class _PlotLossesCallback():
27 def __init__(self, **kwargs):
---> 28 self.liveplot = PlotLosses(**kwargs)
29
30 def on_train_begin(self, logs={}):
/anaconda3/lib/python3.6/site-packages/livelossplot/generic_plot.py in __init__(self, figsize, cell_size, dynamic_x_axis, max_cols, max_epoch, metric2title, series_fmt, validation_fmt, plot_extrema, fig_path, target)
37 self.plot_extrema = plot_extrema
38 self.target = target
---> 39 from .neptune_integration import neptune_send_plot
40 self.fig_path = fig_path
41
/anaconda3/lib/python3.6/site-packages/livelossplot/neptune_integration.py in <module>
----> 1 import neptune
2
3 ctx = neptune.Context()
4
5
ModuleNotFoundError: No module named 'neptune'
@collinp-spindance THen it is NOT the latest version from GitHub (though, it may be the last from PyPI). There is no such import in: https://github.com/stared/livelossplot/blob/master/livelossplot/generic_plot.py
@stared Hmm. I used pip install git+git://github.com/stared/livelossplot.git
. What is the best way to get the latest version from github? Clone the repo?
@stared I have the same error. Even after installing your last commit with pip install git+git://github.com/stared/livelossplot.git@090eb512f436be5f7b663aea2c4e373a62bdeec8
Same problem, I'm using pip install git+git://github.com/stared/livelossplot.git@651f1be9c6df75a24e4cd47c3bb150da98132cdb to just get the latest commit before the neptune integration was introduced
I did test it locally, and it produces no errors. Are you sure you uninstalled livelossplot before installing it from git? (Since there it is the same version, pip may not recognize that the code is different.)
Regardless, I will make an update shortly.
Indeed uninstall before install the specific commit from git solves the problem
Published 0.3.3
to PyPi, it should work.
@stared Re-installed from PyPi and it is working great for me now. Thank you very much!
from livelossplot.keras import PlotLossesCallback callbacks_list = [PlotLossesCallback()]
ModuleNotFoundError Traceback (most recent call last)