exactly the same as #2761 but with a different error message, this time:
(tamp_env) davide@davides-MBP fairseq % MODEL_DIR=wmt14.en-fr.fconv-py
fairseq-interactive \
--path $MODEL_DIR/model.pt $MODEL_DIR \
--beam 5 --source-lang en --target-lang fr \
--tokenizer moses \
--bpe subword_nmt --bpe-codes $MODEL_DIR/bpecodes
Traceback (most recent call last):
File "/Users/davide/Projects/tamp/tamp_env/bin/fairseq-interactive", line 33, in
sys.exit(load_entry_point('fairseq', 'console_scripts', 'fairseq-interactive')())
File "/Users/davide/Projects/tamp/fairseq/fairseq_cli/interactive.py", line 320, in cli_main
args = options.parse_args_and_arch(parser)
File "/Users/davide/Projects/tamp/fairseq/fairseq/options.py", line 159, in parse_args_and_arch
TASK_REGISTRY[args.task].add_args(parser)
File "/Users/davide/Projects/tamp/fairseq/fairseq/tasks/translation.py", line 195, in add_args
help='source language')
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1373, in add_argument
return self._add_action(action)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1736, in _add_action
self._optionals._add_action(action)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1577, in _add_action
action = super(_ArgumentGroup, self)._add_action(action)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1387, in _add_action
self._check_conflict(action)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1526, in _check_conflict
conflict_handler(action, confl_optionals)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1535, in _handle_conflict_error
raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument -s/--source-lang: conflicting option string: --source-lang
Same as #2761,
1) done a fresh install as per the instruction in https://fairseq.readthedocs.io/en/latest/getting_started.html
2) downloaded the wmt14 model
curl https://dl.fbaipublicfiles.com/fairseq/models/wmt14.v2.en-fr.fconv-py.tar.bz2 | tar xvjf -
3)launched fairseq-interactive
MODEL_DIR=wmt14.en-fr.fconv-py
fairseq-interactive
--path $MODEL_DIR/model.pt $MODEL_DIR
--beam 5 --source-lang en --target-lang fr
--tokenizer moses
--bpe subword_nmt --bpe-codes $MODEL_DIR/bpecodes
result:
argparse.ArgumentError: argument -s/--source-lang: conflicting option string: --source-lang
pip, source): as per instructionsFull error stack:
MODEL_DIR=wmt14.en-fr.fconv-py
fairseq-interactive \
--path $MODEL_DIR/model.pt $MODEL_DIR \
--beam 5 --source-lang en --target-lang fr \
--tokenizer moses \
--bpe subword_nmt --bpe-codes $MODEL_DIR/bpecodes
Traceback (most recent call last):
File "/Users/davide/Projects/tamp/tamp_env/bin/fairseq-interactive", line 33, in
sys.exit(load_entry_point('fairseq', 'console_scripts', 'fairseq-interactive')())
File "/Users/davide/Projects/tamp/fairseq/fairseq_cli/interactive.py", line 320, in cli_main
args = options.parse_args_and_arch(parser)
File "/Users/davide/Projects/tamp/fairseq/fairseq/options.py", line 159, in parse_args_and_arch
TASK_REGISTRY[args.task].add_args(parser)
File "/Users/davide/Projects/tamp/fairseq/fairseq/tasks/translation.py", line 195, in add_args
help='source language')
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1373, in add_argument
return self._add_action(action)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1736, in _add_action
self._optionals._add_action(action)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1577, in _add_action
action = super(_ArgumentGroup, self)._add_action(action)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1387, in _add_action
self._check_conflict(action)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1526, in _check_conflict
conflict_handler(action, confl_optionals)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1535, in _handle_conflict_error
raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument -s/--source-lang: conflicting option string: --source-lang
I just tried to run exactly the same command on the latest version of fairseq and I don't see the issue. Could be fixed with #2761
If you still see the issue, can you please get exact version of your fairseq and re-open this ticket:
git log -n 1