Jwoo5 / fairseq-signals

A collection of deep learning models for ECG data processing based on fairseq framework
Other
78 stars 12 forks source link

Error while pre-training #16

Closed pranavPrakhar closed 1 year ago

pranavPrakhar commented 1 year ago

When I run the command for pre-training : fairseq-hydra-train \ task.data=/path/to/manifest/cmsc \ --config-dir examples/w2v_clocs/config/pretraining \ --config-name w2v_cmsc_rlm

I am getting this error:

Traceback (most recent call last):
  File "/home/pranav.prakhar/dev1/lib/python3.8/site-packages/fairseq_cli/hydra_train.py", line 27, in hydra_main
    _hydra_main(cfg)
  File "/home/pranav.prakhar/dev1/lib/python3.8/site-packages/fairseq_cli/hydra_train.py", line 56, in _hydra_main
    distributed_utils.call_main(cfg, pre_main, **kwargs)
  File "/home/pranav.prakhar/dev1/lib/python3.8/site-packages/fairseq/distributed/utils.py", line 369, in call_main
    main(cfg, **kwargs)
  File "/home/pranav.prakhar/dev1/lib/python3.8/site-packages/fairseq_cli/train.py", line 88, in main
    task = tasks.setup_task(cfg.task)
  File "/home/pranav.prakhar/dev1/lib/python3.8/site-packages/fairseq/tasks/__init__.py", line 42, in setup_task
    assert (
AssertionError: Could not infer task type from {'_name': 'ecg_pretraining', 'data': 'manifest_cmsc/cmsc', 'perturbation_mode': ['random_leads_masking'], 'p': [1.0], 'mask_leads_selection': 'random', 'mask_leads_prob': 0.5, 'normalize': False, 'enable_padding': True, 'enable_padding_leads': False, 'leads_to_load': None}. Available argparse tasks: dict_keys(['speech_to_text', 'translation', 'simul_speech_to_text', 'simul_text_to_text', 'sentence_prediction', 'language_modeling', 'sentence_ranking', 'multilingual_masked_lm', 'speech_unit_modeling', 'audio_pretraining', 'audio_finetuning', 'translation_from_pretrained_xlm', 'text_to_speech', 'speech_to_speech', 'denoising', 'multilingual_denoising', 'hubert_pretraining', 'translation_from_pretrained_bart', 'online_backtranslation', 'frm_text_to_speech', 'translation_lev', 'multilingual_translation', 'cross_lingual_lm', 'legacy_masked_lm', 'masked_lm', 'semisupervised_translation', 'multilingual_language_modeling', 'sentence_prediction_adapters', 'translation_multi_simple_epoch', 'dummy_lm', 'dummy_masked_lm', 'dummy_mt']). Available hydra tasks: dict_keys(['translation', 'simul_text_to_text', 'sentence_prediction', 'language_modeling', 'speech_unit_modeling', 'audio_pretraining', 'audio_finetuning', 'translation_from_pretrained_xlm', 'hubert_pretraining', 'translation_lev', 'masked_lm', 'multilingual_language_modeling', 'sentence_prediction_adapters', 'dummy_lm', 'dummy_masked_lm'])

I think it'a a problem with fairseq library but I am not able to figure it out. Reference issues: https://github.com/facebookresearch/fairseq/issues/3683 https://github.com/facebookresearch/fairseq/issues/4717

@Jwoo5

pranavPrakhar commented 1 year ago

It was an error on my part. While preprocessing we have to structure the destination as /preprocess/ptb-xl.