1

I am trying to run the OpenNMT project using the instruction from the link: http://forum.opennmt.net/t/text-summarization-on-gigaword-and-rouge-scoring/85/6

I am using Python 2.7 and installed pytorch from the github repository.
I am trying to run the program using the prebuild model of the OpenNMT, which I have downloaded from the following: http://opennmt.net/Models/

I tried the command:

python translate.py -model textsum_epoch7_14.69_release.t7 -src data/Giga/input.txt

Got the following error:

Traceback (most recent call last):
  File "translate.py", line 151, in <module>
    main()
  File "translate.py", line 70, in main
    translator = onmt.Translator(opt)
  File "/home/ubuntu/opennmt/onmt/Translator.py", line 21, in __init__
    checkpoint = torch.load(opt.model)
  File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 229, in load
    return _load(f, map_location, pickle_module)
  File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 367, in _load
    magic_number = pickle_module.load(f)
cPickle.UnpicklingError: invalid load key, ''.

Kindly let me know what I need to do so that I can use the model and check the library OpenNMT.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Jaffer Wilson
  • 7,029
  • 10
  • 62
  • 139

1 Answers1

1

The model you downloaded is for the Lua version of OpenNMT.

If you are just a user of the project, I recommend you to use this version as it is the most supported and stable.

guillaumekln
  • 504
  • 5
  • 17
  • I want to use it in my python project .. how is it possible can you explain? If there is any python Model then kindly suggest. – Jaffer Wilson Jun 07 '17 at 08:12
  • There is none publicly available as far as I know. However, such model is actually pretty [easy to train](http://forum.opennmt.net/t/text-summarization-on-gigaword-and-rouge-scoring/85). Or you can request someone to share their model, as you did on the forum. – guillaumekln Jun 07 '17 at 08:20
  • As I made a request, as I was willing to see the result and then train for more itertions or setting epochs more than 13. Is there any model available with you, so you can share if possible. – Jaffer Wilson Jun 07 '17 at 08:36
  • Sorry I did not train any summarization models. – guillaumekln Jun 07 '17 at 08:55