daniel-kukiela / nmt-chatbot

NMT Chatbot
GNU General Public License v3.0
385 stars 213 forks source link

issue whilst running train.py #89

Closed gonatrollya closed 5 years ago

gonatrollya commented 6 years ago

i prepared the data and everything else and when i run the train.py file i get this error Traceback (most recent call last): File "train.py", line 8, in from nmt import nmt ImportError: cannot import name 'nmt'

C:\Users\xyz\Desktop\chatbot\nmt-chatbot-master>train.py Traceback (most recent call last): File "C:\Users\xyz\Desktop\chatbot\nmt-chatbot-master\train.py", line 8, in from nmt import nmt ImportError: cannot import name 'nmt'

sierikov commented 6 years ago

There is no module nmt to import. Check the following directory C:\Users\xyz\Desktop\chatbot\nmt-chatbot-master\nmt\ if it is empty clone this repo using --recursive mod

$ git clone --recursive https://github.com/daniel-kukiela/nmt-chatbot

(or)

$ git clone --branch v0.1 --recursive https://github.com/daniel-kukiela/nmt-chatbot.git 
#for a version featured in Sentdex tutorial
Phaidonas commented 5 years ago

Check tf version, i had 1.10 and i downgrade to 1.4 to make it work, also check all you dependancies versions

daniel-kukiela commented 5 years ago

Issue with a version is now fixed.

Chadhendrixs commented 5 years ago

What if you're on windows? Do you just have to install a bash client?

nikinov commented 4 years ago

I got this and I pulled recursively can you guys help I tried this on tensorflow(CPU) and tensorflow(GPU) with an RTX 2080 still the same. This one is the one from tensorflow(CPU) on mac

File "train.py", line 7, in from nmt import nmt File "/Volumes/SSDexternal/OSX/nicholasnovelle/PycharmProjects/tensorEnv/stuff/Chattbott/nmt-chatbot/nmt/nmt/nmt.py", line 28, in from . import inference File "/Volumes/SSDexternal/OSX/nicholasnovelle/PycharmProjects/tensorEnv/stuff/Chattbott/nmt-chatbot/nmt/nmt/inference.py", line 24, in from . import attention_model File "/Volumes/SSDexternal/OSX/nicholasnovelle/PycharmProjects/tensorEnv/stuff/Chattbott/nmt-chatbot/nmt/nmt/attention_model.py", line 22, in from . import model File "/Volumes/SSDexternal/OSX/nicholasnovelle/PycharmProjects/tensorEnv/stuff/Chattbott/nmt-chatbot/nmt/nmt/model.py", line 31, in utils.check_tensorflow_version() File "/Volumes/SSDexternal/OSX/nicholasnovelle/PycharmProjects/tensorEnv/stuff/Chattbott/nmt-chatbot/nmt/nmt/utils/misc_utils.py", line 34, in check_tensorflow_version raise EnvironmentError("Tensorflow version must >= %s" % min_tf_version) OSError: Tensorflow version must >= 1.4.0

nikinov commented 4 years ago

ok tf2 gave me a different error but I think I found the solution if you use a tf 1 or lower then you're gonna have to delete or comma out all the places where the check_tensorflow_version() is called that is in nmt/nmt/model.py nmt/nmt/train.py nmt/nmt/nmt.py the function is defined in nmt/nmt/utils/misc_utils.py the training process will work just fine on tf 1.15.3 1.14.0 and so on.