xfspell icon indicating copy to clipboard operation
xfspell copied to clipboard

fairseq-interactive: error: unrecognized arguments: --path model7m/checkpoint_best.pt --source-lang fr

Open ljpetkovic opened this issue 3 years ago • 0 comments

Hello,

After running this command:

$ echo "tisimptant too spll chck ths dcment." \
    | python src/tokenize.py \
    | fairseq-interactive model7m/ \
    --path model7m/checkpoint_best.pt \
    --source-lang fr --target-lang en --beam 10 \
   | python src/format_fairseq_output.py

I get the following error:

usage: fairseq-interactive [-h] [--no-progress-bar] [--log-interval N]
                           [--log-format {json,none,simple,tqdm}]
                           [--tensorboard-logdir DIR] [--seed N] [--cpu]
                           [--fp16] [--memory-efficient-fp16]
                           [--fp16-init-scale FP16_INIT_SCALE]
                           [--fp16-scale-window FP16_SCALE_WINDOW]
                           [--fp16-scale-tolerance FP16_SCALE_TOLERANCE]
                           [--min-loss-scale D]
                           [--threshold-loss-scale THRESHOLD_LOSS_SCALE]
                           [--user-dir USER_DIR]
                           [--empty-cache-freq EMPTY_CACHE_FREQ]
                           [--criterion {cross_entropy,adaptive_loss,legacy_masked_lm_loss,nat_loss,label_smoothed_cross_entropy,composite_loss,binary_cross_entropy,sentence_prediction,label_smoothed_cross_entropy_with_alignment,masked_lm,sentence_ranking}]
                           [--tokenizer {nltk,space,moses}]
                           [--bpe {sentencepiece,fastbpe,gpt2,subword_nmt,bert}]
                           [--optimizer {nag,adafactor,sgd,adamax,adagrad,adam,adadelta}]
                           [--lr-scheduler {fixed,reduce_lr_on_plateau,polynomial_decay,inverse_sqrt,tri_stage,cosine,triangular}]
                           [--task TASK] [--num-workers N]
                           [--skip-invalid-size-inputs-valid-test]
                           [--max-tokens N] [--max-sentences N]
                           [--required-batch-size-multiple N]
                           [--dataset-impl FORMAT] [--gen-subset SPLIT]
                           [--num-shards N] [--shard-id ID] [--path FILE]
                           [--remove-bpe [REMOVE_BPE]] [--quiet]
                           [--model-overrides DICT] [--results-path RESDIR]
                           [--beam N] [--nbest N] [--max-len-a N]
                           [--max-len-b N] [--min-len N] [--match-source-len]
                           [--no-early-stop] [--unnormalized]
                           [--no-beamable-mm] [--lenpen LENPEN]
                           [--unkpen UNKPEN] [--replace-unk [REPLACE_UNK]]
                           [--sacrebleu] [--score-reference]
                           [--prefix-size PS] [--no-repeat-ngram-size N]
                           [--sampling] [--sampling-topk PS]
                           [--sampling-topp PS] [--temperature N]
                           [--diverse-beam-groups N]
                           [--diverse-beam-strength N] [--print-alignment]
                           [--print-step] [--iter-decode-eos-penalty N]
                           [--iter-decode-max-iter N]
                           [--iter-decode-force-max-iter]
                           [--retain-iter-history]
                           [--decoding-format {unigram,ensemble,vote,dp,bs}]
                           [--buffer-size N] [--input FILE] [--momentum M]
                           [--weight-decay WD] [--force-anneal N]
                           [--lr-shrink LS] [--warmup-updates N] [-s SRC]
                           [-t TARGET] [--lazy-load] [--raw-text]
                           [--load-alignments] [--left-pad-source BOOL]
                           [--left-pad-target BOOL] [--max-source-positions N]
                           [--max-target-positions N]
                           [--upsample-primary UPSAMPLE_PRIMARY]
                           [--truncate-source]
                           data
fairseq-interactive: error: unrecognized arguments:  --path model7m/checkpoint_best.pt  --source-lang fr  

I installed fairseq 0.9.0 by running pip install -r requirements.txt.

ljpetkovic avatar Jan 24 '22 16:01 ljpetkovic