IBM / transition-amr-parser

SoTA Abstract Meaning Representation (AMR) parsing with word-node alignments in Pytorch. Includes checkpoints and other tools such as statistical significance Smatch.
Apache License 2.0
243 stars 48 forks source link

"Unable to infer Criterion arguments, please implement LabelSmoothedCrossEntropyPointerCriterion.build_criterion" when running minimal_test.sh #28

Closed aianta closed 2 years ago

aianta commented 2 years ago

I'm trying to get going on wsl2, and have been running into some trouble getting set up.

At first the scripts were searching for fairseq_ext on the wrong path: specifically I was getting FileNotFound errors on the path /ibm-amr/fairseq_ext. This made sense because fairseq_ext was of course located in /ibm-amr/transition-amr-parser/fairseq_ext.

So I went ahead and did a global find & replace changing ../fairseq_ext to ./fairseq_ext, which got me a little further. Unfortunately, the problem then was:

ImportError: Failed to import --user-dir=/home/aianta/ibm-amr/transition-amr-parser/fairseq_ext because the corresponding module name (fairseq_ext) is not globally unique. Please rename the directory to something unique and try again.

Renaming the folder did not help, but I reasoned, if the issue is a duplicate module, that might suggest that fairseq_ext was in fact already loaded. So I went ahead and commented out all instances of utils.import_user_module(usr_args) and sure enough, the minimal test proceeded further.

I'm now stuck on:

[Configuration file:]
configs/wiki25.sh
[Building oracle actions:]
[Configuration file:]
configs/wiki25.sh
Directory to aligner: DATA/wiki25/aligned/cofill/ already exists --- do nothing.
[normalize rules] months
[normalize rules] units
[normalize rules] cardinals
[normalize rules] ordinals
Reading DATA/wiki25/aligned/cofill//train.txt
25 sentences
216/293 node types/tokens
35/285 edge types/tokens
241/383 word types/tokens
Oracle: 25it [00:00, 431.06it/s]
Base actions:
Counter({'PRED': 63, 'RA': 20, 'LA': 19, 'ENTITY': 15, 'REDUCE': 1, 'SHIFT': 1, 'COPY_LEMMA': 1, 'COPY_SENSE01': 1, 'MERGE': 1})
Most frequent actions:
[('SHIFT', 198), ('REDUCE', 184), ('COPY_LEMMA', 62), ('MERGE', 26), ('LA(root)', 22), ('COPY_SENSE01', 20), ('LA(:ARG1)', 18), ('RA(:ARG1)', 13), ('LA(:ARG0)', 12), ('PRED(person)', 12)]
80 singleton actions
Counter({'PRED': 59, 'ENTITY': 9, 'RA': 8, 'LA': 4})
Reading DATA/wiki25/aligned/cofill//dev.txt
25 sentences
216/293 node types/tokens
35/285 edge types/tokens
241/383 word types/tokens
Oracle: 25it [00:00, 445.79it/s]
Base actions:
Counter({'PRED': 63, 'RA': 20, 'LA': 19, 'ENTITY': 15, 'REDUCE': 1, 'SHIFT': 1, 'COPY_LEMMA': 1, 'COPY_SENSE01': 1, 'MERGE': 1})
Most frequent actions:
[('SHIFT', 198), ('REDUCE', 184), ('COPY_LEMMA', 62), ('MERGE', 26), ('LA(root)', 22), ('COPY_SENSE01', 20), ('LA(:ARG1)', 18), ('RA(:ARG1)', 13), ('LA(:ARG0)', 12), ('PRED(person)', 12)]
80 singleton actions
Counter({'PRED': 59, 'ENTITY': 9, 'RA': 8, 'LA': 4})
Reading DATA/wiki25/aligned/cofill//test.txt
25 sentences
216/293 node types/tokens
35/285 edge types/tokens
241/383 word types/tokens
Oracle: 25it [00:00, 427.50it/s]
Base actions:
Counter({'PRED': 63, 'RA': 20, 'LA': 19, 'ENTITY': 15, 'REDUCE': 1, 'SHIFT': 1, 'COPY_LEMMA': 1, 'COPY_SENSE01': 1, 'MERGE': 1})
Most frequent actions:
[('SHIFT', 198), ('REDUCE', 184), ('COPY_LEMMA', 62), ('MERGE', 26), ('LA(root)', 22), ('COPY_SENSE01', 20), ('LA(:ARG1)', 18), ('RA(:ARG1)', 13), ('LA(:ARG0)', 12), ('PRED(person)', 12)]
80 singleton actions
Counter({'PRED': 59, 'ENTITY': 9, 'RA': 8, 'LA': 4})
[Preprocessing data:]
[Configuration file:]
configs/wiki25.sh
Cleaning up partially completed DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//
Namespace(user_dir='./fairseq_ext')
Namespace(alignfile=None, batch_normalize_reward=False, bert_layers=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24], bpe=None, cpu=False, criterion='cross_entropy', dataset_impl='mmap', destdir='DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//', embdir='DATA/wiki25/embeddings/RoBERTa-large-top24', fp16=False, fp16_init_scale=128, fp16_scale_tolerance=0.0, fp16_scale_window=None, gold_annotations=None, gold_episode_ratio=None, joined_dictionary=False, log_format=None, log_interval=1000, lr_scheduler='fixed', machine_rules=None, machine_type=None, memory_efficient_fp16=False, min_loss_scale=0.0001, no_progress_bar=False, nwordssrc=-1, nwordstgt=-1, only_source=False, optimizer=None, padding_factor=8, pretrained_embed='roberta.large', scoring='bleu', seed=1, source_lang='en', srcdict=None, target_lang='actions', task='amr_action_pointer_graphmp', tbmf_wrapper=False, tensorboard_logdir='', testpref='DATA/wiki25/oracles/cofill_o8.3_act-states//test', tgtdict=None, threshold_loss_scale=None, thresholdsrc=0, thresholdtgt=0, tokenizer=None, trainpref='DATA/wiki25/oracles/cofill_o8.3_act-states//train', user_dir='./fairseq_ext', validpref='DATA/wiki25/oracles/cofill_o8.3_act-states//dev', workers=1)
| [en] Dictionary: 247 types
| [en] DATA/wiki25/oracles/cofill_o8.3_act-states//train.en: 25 sents, 408 tokens, 0.0% replaced by <unk>
| [en] Dictionary: 247 types
| [en] DATA/wiki25/oracles/cofill_o8.3_act-states//dev.en: 25 sents, 408 tokens, 0.0% replaced by <unk>
| [en] Dictionary: 247 types
| [en] DATA/wiki25/oracles/cofill_o8.3_act-states//test.en: 25 sents, 408 tokens, 0.0% replaced by <unk>
----------------------------------------------------------------------------------------------------
Generate and process action states information (number of workers: 1):
[English sentence file: DATA/wiki25/oracles/cofill_o8.3_act-states//train.en]
[AMR actions file: DATA/wiki25/oracles/cofill_o8.3_act-states//train.actions]
processing ...
finished !
Processed data saved to path with prefix: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//train.en-actions.actions
Total time elapsed: 0s
----------------------------------------------------------------------------------------------------
| [actions] DATA/wiki25/oracles/cofill_o8.3_act-states//train.actions_nopos: 25 sents, 796 tokens, 0.0% replaced by <unk>
----------------------------------------------------------------------------------------------------
Generate and process action states information (number of workers: 1):
[English sentence file: DATA/wiki25/oracles/cofill_o8.3_act-states//dev.en]
[AMR actions file: DATA/wiki25/oracles/cofill_o8.3_act-states//dev.actions]
processing ...
finished !
Processed data saved to path with prefix: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions
Total time elapsed: 0s
----------------------------------------------------------------------------------------------------
| [actions] DATA/wiki25/oracles/cofill_o8.3_act-states//dev.actions_nopos: 25 sents, 796 tokens, 0.0% replaced by <unk>
----------------------------------------------------------------------------------------------------
Generate and process action states information (number of workers: 1):
[English sentence file: DATA/wiki25/oracles/cofill_o8.3_act-states//test.en]
[AMR actions file: DATA/wiki25/oracles/cofill_o8.3_act-states//test.actions]
processing ...
finished !
Processed data saved to path with prefix: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//test.en-actions.actions
Total time elapsed: 0s
----------------------------------------------------------------------------------------------------
| [actions] DATA/wiki25/oracles/cofill_o8.3_act-states//test.actions_nopos: 25 sents, 796 tokens, 0.0% replaced by <unk>
Using cache found in /home/aianta/.cache/torch/hub/pytorch_fairseq_main
Using roberta.large extraction in GPU

Using cache found in /home/aianta/.cache/torch/hub/pytorch_fairseq_main
Using roberta.large extraction in GPU

Using cache found in /home/aianta/.cache/torch/hub/pytorch_fairseq_main
Using roberta.large extraction in GPU

| Wrote preprocessed oracle data to DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//
| Wrote preprocessed embedding data to DATA/wiki25/embeddings/RoBERTa-large-top24
[Training:]
[Configuration file:]
configs/wiki25.sh
Namespace(activation_dropout=0.0, activation_fn='relu', adam_betas='(0.9,0.98)', adam_eps=1e-08, adaptive_input=False, adaptive_softmax_cutoff=None, adaptive_softmax_dropout=0, all_gather_list_size=16384, append_eos_to_target=0, apply_tgt_actnode_masks=0, apply_tgt_input_src=0, apply_tgt_src_align=1, apply_tgt_vocab_masks=1, arch='transformer_tgt_pointer_graphmp', attention_dropout=0.0, batch_size=None, batch_size_valid=None, bert_backprop=False, best_checkpoint_metric='loss', bf16=False, bpe=None, broadcast_buffers=False, bucket_cap_mb=25, checkpoint_shard_count=1, checkpoint_suffix='', clip_norm=0.0, collate_tgt_states=1, cpu=False, criterion='label_smoothed_cross_entropy_pointer', curriculum=0, data='DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//', data_buffer_size=10, dataset_impl=None, ddp_backend='c10d', decoder_attention_heads=4, decoder_embed_dim=256, decoder_embed_path=None, decoder_ffn_embed_dim=512, decoder_input_dim=256, decoder_layers=6, decoder_learned_pos=False, decoder_normalize_before=False, decoder_output_dim=256, device_id=0, disable_validation=False, distributed_backend='nccl', distributed_init_method=None, distributed_no_spawn=False, distributed_num_procs=1, distributed_port=-1, distributed_rank=0, distributed_world_size=1, distributed_wrapper='DDP', dropout=0.3, emb_dir='DATA/wiki25/embeddings/RoBERTa-large-top24', empty_cache_freq=0, encode_state_machine=None, encoder_attention_heads=4, encoder_embed_dim=256, encoder_embed_path=None, encoder_ffn_embed_dim=512, encoder_layers=6, encoder_learned_pos=False, encoder_normalize_before=False, fast_stat_sync=False, find_unused_parameters=False, finetune_from_model=None, fix_batches_to_gpus=False, fixed_validation_seed=None, fp16=False, fp16_init_scale=128, fp16_no_flatten_grads=False, fp16_scale_tolerance=0.0, fp16_scale_window=None, gen_subset='test', keep_best_checkpoints=-1, keep_interval_updates=-1, keep_last_epochs=6, label_smoothing=0.01, lazy_load=False, left_pad_source='True', left_pad_target='False', localsgd_frequency=3, log_format='json', log_interval=100, loss_coef=1.0, lr=[0.0005], lr_scheduler='inverse_sqrt', max_epoch=10, max_source_positions=1024, max_target_positions=1024, max_tokens=3584, max_tokens_valid=3584, max_update=0, maximize_best_checkpoint_metric=False, memory_efficient_bf16=False, memory_efficient_fp16=False, min_loss_scale=0.0001, min_lr=1e-09, model_parallel_size=1, no_bert_precompute=False, no_epoch_checkpoints=False, no_last_checkpoints=False, no_progress_bar=False, no_save=False, no_save_optimizer_state=False, no_seed_provided=False, no_token_positional_embeddings=False, nprocs_per_node=1, num_shards=1, num_workers=1, optimizer='adam', optimizer_overrides='{}', patience=-1, pipeline_balance=None, pipeline_checkpoint='never', pipeline_chunks=0, pipeline_decoder_balance=None, pipeline_decoder_devices=None, pipeline_devices=None, pipeline_encoder_balance=None, pipeline_encoder_devices=None, pipeline_model_parallel=False, pointer_dist_decoder_selfattn_avg=0, pointer_dist_decoder_selfattn_heads=1, pointer_dist_decoder_selfattn_infer=5, pointer_dist_decoder_selfattn_layers=[5], pretrained_embed_dim=1024, profile=False, quantization_config_path=None, raw_text=False, required_batch_size_multiple=8, required_seq_len_multiple=1, reset_dataloader=False, reset_lr_scheduler=False, reset_meters=False, reset_optimizer=False, restore_file='checkpoint_last.pt', save_dir='DATA/wiki25/models/exp_cofill_o8.3_act-states_RoBERTa-large-top24/_act-pos-grh_vmask1_shiftpos1_ptr-lay6-h1_grh-lay123-h2-allprev_1in1out_cam-layall-h2-abuf/ep10-seed42', save_interval=1, save_interval_updates=0, scoring='bleu', seed=42, sentence_avg=False, shard_id=0, share_all_embeddings=False, share_decoder_input_output_embed=0, shift_pointer_value=1, skip_invalid_size_inputs_valid_test=False, slowmo_algorithm='LocalSGD', slowmo_momentum=None, source_lang=None, stop_time_hours=0, target_lang=None, task='amr_action_pointer_graphmp', tensorboard_logdir='DATA/wiki25/models/exp_cofill_o8.3_act-states_RoBERTa-large-top24/_act-pos-grh_vmask1_shiftpos1_ptr-lay6-h1_grh-lay123-h2-allprev_1in1out_cam-layall-h2-abuf/ep10-seed42', tgt_factored_emb_out=0, tgt_graph_heads=2, tgt_graph_layers=[0, 1, 2], tgt_graph_mask='allprev_1in1out', tgt_input_src_backprop=1, tgt_input_src_combine='add', tgt_input_src_emb='top', tgt_src_align_focus=['p0c1n0', 'p0c0n*'], tgt_src_align_heads=2, tgt_src_align_layers=[0, 1, 2, 3, 4, 5], threshold_loss_scale=None, tokenizer=None, tpu=False, train_subset='train', update_freq=[1], upsample_primary=1, use_bmuf=False, use_old_adam=False, user_dir='./fairseq_ext', valid_subset='valid', validate_after_updates=0, validate_interval=1, validate_interval_updates=0, warmup_init_lr=1e-07, warmup_updates=4000, weight_decay=0.0, zero_sharding='none')
| [en] dictionary: 248 types
| [actions_nopos] dictionary: 128 types
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.en
| loaded 25 examples from: DATA/wiki25/embeddings/RoBERTa-large-top24/valid.en-actions.en.bert
| loaded 25 examples from: DATA/wiki25/embeddings/RoBERTa-large-top24/valid.en-actions.en.wordpieces
| loaded 25 examples from: DATA/wiki25/embeddings/RoBERTa-large-top24/valid.en-actions.en.wp2w
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.nopos_in
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.nopos_out
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.pos
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.vocab_masks
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.src_cursors
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actnode_masks
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actedge_masks
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actedge_1stnode_masks
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actedge_indexes
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actedge_cur_node_indexes
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actedge_cur_1stnode_indexes
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actedge_pre_node_indexes
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actedge_directions
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actedge_allpre_indexes
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actedge_allpre_pre_node_indexes
| loaded 25 examples from: DATA/wiki25/features/cofill_o8.3_act-states_RoBERTa-large-top24//valid.en-actions.actions.actedge_allpre_directions
Traceback (most recent call last):
  File "fairseq_ext/train.py", line 338, in <module>
    cli_main()
  File "fairseq_ext/train.py", line 334, in cli_main
    main(args)
  File "fairseq_ext/train.py", line 73, in main
    criterion = task.build_criterion(args)
  File "/home/aianta/anaconda3/envs/amr-2/lib/python3.7/site-packages/fairseq/tasks/fairseq_task.py", line 289, in build_criterion
    return criterions.build_criterion(args, self)
  File "/home/aianta/anaconda3/envs/amr-2/lib/python3.7/site-packages/fairseq/criterions/__init__.py", line 31, in build_criterion
    return build_criterion_(criterion_cfg, task)
  File "/home/aianta/anaconda3/envs/amr-2/lib/python3.7/site-packages/fairseq/registry.py", line 54, in build_x
    return builder(args, *extra_args, **extra_kwargs)
  File "/home/aianta/anaconda3/envs/amr-2/lib/python3.7/site-packages/fairseq/criterions/fairseq_criterion.py", line 57, in build_criterion
    "{}.build_criterion".format(cls.__name__)
NotImplementedError: Unable to infer Criterion arguments, please implement LabelSmoothedCrossEntropyPointerCriterion.build_criterion

This is my conda list:

# packages in environment at /home/aianta/anaconda3/envs/amr-2:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main
_openmp_mutex             5.1                       1_gnu
antlr-python-runtime      4.8                pyhd8ed1ab_3    conda-forge
astunparse                1.6.3                      py_0
attrs                     21.4.0             pyhd3eb1b0_0
blas                      1.0                         mkl
brotlipy                  0.7.0           py37h27cfd23_1003
bzip2                     1.0.8                h7b6447c_0
c-ares                    1.18.1               h7f8727e_0
ca-certificates           2022.4.26            h06a4308_0
catalogue                 1.0.0                    py37_1
certifi                   2022.6.15        py37h06a4308_0
cffi                      1.15.0           py37hd667e15_1
charset-normalizer        2.0.4              pyhd3eb1b0_0
cmake                     3.22.1               h1fce559_0
colorama                  0.4.5              pyhd8ed1ab_0    conda-forge
cryptography              37.0.1           py37h9ce1e76_0
cudatoolkit               11.3.1               h2bc3f7f_2
cymem                     2.0.6            py37h295c915_0
cython                    0.29.30          py37hd23a5d3_0    conda-forge
cython-blis               0.7.7            py37hce1f21e_0
dataclasses               0.8                pyh6d0b6a4_7
en-core-web-sm            2.3.1                    pypi_0    pypi
expat                     2.4.4                h295c915_0
fairseq                   0.10.2           py37hdc94413_0    conda-forge
ffmpeg                    4.3                  hf484d3e_0    pytorch
freetype                  2.10.4               h0708190_1    conda-forge
future                    0.18.2                   py37_1
gmp                       6.2.1                h58526e2_0    conda-forge
gnutls                    3.6.13               h85f3911_1    conda-forge
hydra-core                1.1.1              pyhd8ed1ab_0    conda-forge
idna                      3.3                pyhd3eb1b0_0
importlib-metadata        4.11.3           py37h06a4308_0
importlib_metadata        4.11.3               hd3eb1b0_0
importlib_resources       5.8.0              pyhd8ed1ab_0    conda-forge
intel-openmp              2021.4.0          h06a4308_3561
jpeg                      9e                   h166bdaf_1    conda-forge
jsonschema                3.0.2                    py37_0
krb5                      1.19.2               hac12032_0
lame                      3.100             h7f98852_1001    conda-forge
lcms2                     2.12                 hddcbb42_0    conda-forge
ld_impl_linux-64          2.38                 h1181459_1
libcurl                   7.82.0               h0b77cf5_0
libedit                   3.1.20210910         h7f8727e_0
libev                     4.33                 h7f8727e_1
libffi                    3.3                  he6710b0_2
libgcc-ng                 11.2.0               h1234567_1
libgomp                   11.2.0               h1234567_1
libiconv                  1.17                 h166bdaf_0    conda-forge
libnghttp2                1.46.0               hce63b2e_0
libpng                    1.6.37               h21135ba_2    conda-forge
libssh2                   1.10.0               h8f2d780_0
libstdcxx-ng              11.2.0               h1234567_1
libtiff                   4.2.0                h2818925_1
libuv                     1.40.0               h7b6447c_0
libwebp-base              1.2.2                h7f98852_1    conda-forge
lz4-c                     1.9.3                h295c915_1
mkl                       2021.4.0           h06a4308_640
mkl-include               2022.0.1           h06a4308_117
mkl-service               2.4.0            py37h7f8727e_0
mkl_fft                   1.3.1            py37hd3c417c_0
mkl_random                1.2.2            py37h51133e4_0
murmurhash                1.0.7            py37h295c915_0
ncurses                   6.3                  h7f8727e_2
nettle                    3.6                  he412f7d_0    conda-forge
ninja                     1.10.2               h06a4308_5
ninja-base                1.10.2               hd09550d_5
numpy                     1.21.5           py37h6c91a56_3
numpy-base                1.21.5           py37ha15fc14_3
olefile                   0.46               pyh9f0ad1d_1    conda-forge
omegaconf                 2.1.1            py37h89c1867_1    conda-forge
openh264                  2.1.1                h780b84a_0    conda-forge
openssl                   1.1.1o               h7f8727e_0
packaging                 21.3               pyhd3eb1b0_0
pillow                    7.2.0            py37h718be6c_2    conda-forge
pip                       21.2.2           py37h06a4308_0
plac                      1.1.0                    py37_1
portalocker               2.4.0            py37h89c1867_0    conda-forge
preshed                   3.0.6            py37h295c915_0
pycparser                 2.21               pyhd3eb1b0_0
pyopenssl                 22.0.0             pyhd3eb1b0_0
pyparsing                 3.0.4              pyhd3eb1b0_0
pyrsistent                0.18.0           py37heee7806_0
pysocks                   1.7.1                    py37_1
python                    3.7.13               h12debd9_0
python_abi                3.7                     2_cp37m    conda-forge
pytorch                   1.10.1          py3.7_cuda11.3_cudnn8.2.0_0    pytorch
pytorch-mutex             1.0                        cuda    pytorch
pyyaml                    6.0              py37h7f8727e_1
readline                  8.1.2                h7f8727e_1
regex                     2022.4.24        py37h540881e_0    conda-forge
requests                  2.27.1             pyhd3eb1b0_0
rhash                     1.4.1                h3c74f83_1
sacrebleu                 2.1.0              pyhd8ed1ab_0    conda-forge
setuptools                61.2.0           py37h06a4308_0
six                       1.16.0             pyhd3eb1b0_1
spacy                     2.3.5            py37hff7bd54_0
sqlite                    3.38.5               hc218d9a_0
srsly                     1.0.5            py37h2531618_0
tabulate                  0.8.10             pyhd8ed1ab_0    conda-forge
thinc                     7.4.5            py37h9a67853_0
tk                        8.6.12               h1ccaba5_0
torch                     1.13.0a0+git4300f64          pypi_0    pypi
torchaudio                0.10.1               py37_cu113    pytorch
torchvision               0.11.2               py37_cu113    pytorch
tqdm                      4.64.0           py37h06a4308_0
typing                    3.10.0.0           pyhd8ed1ab_0    conda-forge
typing_extensions         4.1.1              pyh06a4308_0
urllib3                   1.26.9           py37h06a4308_0
wasabi                    0.9.1            py37h06a4308_0
wheel                     0.37.1             pyhd3eb1b0_0
xz                        5.2.5                h7f8727e_1
yaml                      0.2.5                h7b6447c_0
zipp                      3.8.0            py37h06a4308_0
zlib                      1.2.12               h7f8727e_2
zstd                      1.5.2                ha4553b6_0

The correctly_installed.sh script returns:

pytorch 1.10.1
cuda 11.3
Apex not installed
Pytorch binaries were compiled with Cuda 11.3 but binary /usr/local/cuda/bin/nvcc is 11.4,
fairseq 0.10.2
spacy 2.3.5
[OK] correctly installed

Are the pytorch libraries the issue here?

ramon-astudillo commented 2 years ago

You should not need to move fairseq_ext that should be at the heart of the problem, if I have to guess.

Try a new install and ensure you use the --editable flag as in

pip install --editable .
aianta commented 2 years ago

Tried again with a completely fresh instance of Ubuntu 20.04 on WSL2 and everything worked like a charm. Thanks! Not quite sure what was wrong with the earlier setup.