Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveLossPlot: ModuleNotFoundError: No module named 'neptune' #51

Closed
bobloki opened this issue Mar 11, 2019 · 13 comments
Closed

LiveLossPlot: ModuleNotFoundError: No module named 'neptune' #51

bobloki opened this issue Mar 11, 2019 · 13 comments

Comments

@bobloki
Copy link

bobloki commented Mar 11, 2019

from livelossplot.keras import PlotLossesCallback
callbacks_list = [PlotLossesCallback()]


ModuleNotFoundError Traceback (most recent call last)
in
4 checkpoint = ModelCheckpoint("C:\home\jupyter\experiments\models",
5 monitor='acc', verbose=1, save_best_only=True, mode='max')
----> 6 callbacks_list = [checkpoint, PlotLossesCallback()]

~\AppData\Local\conda\conda\envs\tesseract\lib\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)

~\AppData\Local\conda\conda\envs\tesseract\lib\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={}):

~\AppData\Local\conda\conda\envs\tesseract\lib\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

~\AppData\Local\conda\conda\envs\tesseract\lib\site-packages\livelossplot\neptune_integration.py in
----> 1 import neptune
2
3 ctx = neptune.Context()
4
5

ModuleNotFoundError: No module named 'neptune'

@khalido
Copy link

khalido commented Mar 12, 2019

I'm using the tf.keras version and getting the same error:

from livelossplot.tf_keras import PlotLossesCallback
plot_losses = PlotLossesCallback()

@stared
Copy link
Owner

stared commented Mar 12, 2019

@khalido @bobloki Thanks for reporting.

It should not require neptune (after #47 it required, but I fixed that with 7876f06; as the general philosophy is to avoid ML packages).

I spotted an unintentional import, fixed with 090eb51. Installing from git should solve it. Version 0.3.3 (not yet released) should work.

@collinp-spindance
Copy link

@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.

@stared
Copy link
Owner

stared commented Mar 12, 2019

@collinp-spindance Stange.
Could you share the new error message?

@collinp-spindance
Copy link

@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'

@stared
Copy link
Owner

stared commented Mar 12, 2019

@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

@collinp-spindance
Copy link

@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?

@sebastienlange
Copy link
Contributor

@stared I have the same error.
Even after installing your last commit with pip install git+git://github.com/stared/livelossplot.git@090eb51

@leofidus
Copy link

Same problem, I'm using pip install git+git://github.com/stared/livelossplot.git@651f1be to just get the latest commit before the neptune integration was introduced

@stared
Copy link
Owner

stared commented Mar 15, 2019

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.

@sebastienlange
Copy link
Contributor

Indeed uninstall before install the specific commit from git solves the problem

@stared
Copy link
Owner

stared commented Mar 16, 2019

Published 0.3.3 to PyPi, it should work.

@stared stared closed this as completed Mar 16, 2019
@collinp-spindance
Copy link

@stared Re-installed from PyPi and it is working great for me now. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants