nmt-chatbot icon indicating copy to clipboard operation
nmt-chatbot copied to clipboard

not loading--ValueError: Can't load save_path when it is None.

Open ghost opened this issue 6 years ago • 5 comments

how are you? Traceback (most recent call last): File "inference.py", line 308, in answers = inference_internal(question)[0] File "inference.py", line 212, in inference_internal return process_questions(questions, True) File "inference.py", line 260, in process_questions answers_list = inference_helper(prepared_questions) File "inference.py", line 181, in start_inference return inference_helper(question) File "inference.py", line 174, in inference_helper = lambda question: do_inference(question, *inference_object) File "inference.py", line 98, in do_inference loaded_infer_model = nmt.inference.model_helper.load_model(infer_model.model, flags.ckpt, sess, "infer") File "/Users/Downloads/nmt-chatbot/nmt/nmt/model_helper.py", line 483, in load_model model.saver.restore(session, ckpt) File "/usr/local/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1796, in restore raise ValueError("Can't load save_path when it is None.") ValueError: Can't load save_path when it is None.

ghost avatar Jul 01 '18 11:07 ghost

solved with tf reinstalation!

ghost avatar Jul 03 '18 05:07 ghost

What is your tf version?

I have tried it with 1.12, 1.4.0 and 1.5.0. But cannot solve the issue. Any comment?

anilsh avatar Nov 13 '18 09:11 anilsh

In this case it looks like there's no checkpoint saved yet. Make sure there is a checkpoint saved.

daniel-kukiela avatar Nov 14 '18 15:11 daniel-kukiela

I am getting the same error

(venv) C:\Users\taha.rushain\NMT-Chatbot>python temp.py
Traceback (most recent call last):
  File "temp.py", line 3, in <module>
    print(inference("Hello!"))
  File "C:\Users\taha.rushain\NMT-Chatbot\inference.py", line 196, in inference
    answers_list = process_questions(questions)
  File "C:\Users\taha.rushain\NMT-Chatbot\inference.py", line 260, in process_questions
    answers_list = inference_helper(prepared_questions)
  File "C:\Users\taha.rushain\NMT-Chatbot\inference.py", line 181, in start_inference
    return inference_helper(question)
  File "C:\Users\taha.rushain\NMT-Chatbot\inference.py", line 174, in <lambda>
    inference_helper = lambda question: do_inference(question, *inference_object)
  File "C:\Users\taha.rushain\NMT-Chatbot\inference.py", line 98, in do_inference
    loaded_infer_model = nmt.inference.model_helper.load_model(infer_model.model, flags.ckpt, sess, "infer")
  File "C:\Users\taha.rushain\NMT-Chatbot\nmt\nmt\model_helper.py", line 483, in load_model
    model.saver.restore(session, ckpt)
  File "C:\Users\taha.rushain\venv\lib\site-packages\tensorflow\python\training\saver.py", line 1662, in restore
    raise ValueError("Can't load save_path when it is None.")
ValueError: Can't load save_path when it is None.

taharushain avatar Dec 04 '18 11:12 taharushain

@daniel-kukiela where do i save the checkpoint file? Is it a .ckpt like a .txt file. I have the same issue. Need help. Kind regards.

Scum1254 avatar Jun 23 '19 14:06 Scum1254