Description
In a4, we use docopt
to parse our options and arguments, but if you try sh run.sh test
now, you will recognize that the usage run.py decode [options] MODEL_PATH TEST_SOURCE_FILE TEST_TARGET_FILE OUTPUT_FILE
doenst work.
Actually, in script run.sh
, our command is python run.py decode model.bin ./en_es_data/test.es ./en_es_data/test.en outputs/test_outputs.txt --cuda
and the option --cuda
wont get parsing because you have not defined in your correspond usage, so we have to add an option beyond this decode usage like this:
run.py decode [options] MODEL_PATH TEST_SOURCE_FILE TEST_TARGET_FILE OUTPUT_FILE [--cuda]
.
Btw the options
ahead just make trouble for us and if it exits we cant get the whole usage parsed, i suggest remove it and final version is as below:
run.py decode MODEL_PATH TEST_SOURCE_FILE TEST_TARGET_FILE OUTPUT_FILE [--cuda]
.
On an other hand, the first train usage also cant recognize the option --cuda
just like the wildcard option [options]
fails, so i have to modified the source code to do training, it's really annoying.
Maybe these bugs just occured after some other bugs of docopt
fixed, for convience of some rookies, you can test your code and modified some content to make it work, thanks a lot!