evilsocket / ergo

🧠 A tool that makes AI easier.
Other
295 stars 36 forks source link

ModuleNotFoundError: No module named 'keras.utils.training_utils'` #10

Closed tobimichigan closed 4 years ago

tobimichigan commented 5 years ago

tried running

  1. ergo help

and

  1. ergo example

and the following error occurs: Traceback (most recent call last): File "/home/hg/anaconda3/bin/ergo", line 22, in <module> from ergo.actions.create import action_create File "/home/hg/anaconda3/lib/python3.7/site-packages/ergo/actions/create.py", line 6, in <module> from ergo.project import Project File "/home/hg/anaconda3/lib/python3.7/site-packages/ergo/project.py", line 13, in <module> from keras.utils.training_utils import multi_gpu_model ModuleNotFoundError: No module named 'keras.utils.training_utils'

any clues?

tux-mind commented 4 years ago

sed -i s/training_utils/multi_gpu_utils/ ergo/project.py

@evilsocket you might want to freeze the versions in requirements.txt :)

TheBuccaneer commented 4 years ago

Actually I couldn't find a solution for this problem. Uninstalled keras and installed it again directly from github. As far as I can tell, it's copying the file, but ergo still doesn't find it. In my case (I don't need gpu support) it works to comment out the import line in project.py.

nicochidt commented 4 years ago

@TheBuccaneer, try doing this:

pip uninstall keras 
pip install keras==2.2.4

If that solves the problem, we can modify the requirements.txt.

SebRut commented 4 years ago

@nicochidt that seems to work for me

dpmendes commented 4 years ago

sed -i s/training_utils/multi_gpu_utils/ ergo/project.py

@evilsocket you might want to freeze the versions in requirements.txt :)

That would help a lot! I'm having trouble with the '.shape' parameter of the 'pe-malicious' column...

nicochidt commented 4 years ago

keras, tensorflow and sklearn versions freezed.