When attempting to train a model using Fairseq, I encountered an AttributeError during the training process. The error occurred after printing information about the dictionary size and seems to be related to the model building process.
2024-04-08 11:29:29 | INFO | fairseq.tasks.speech_to_text | dictionary size (dict.txt): 1,007
Traceback (most recent call last):
File "/home/hp/miniconda3/envs/test_fairseq/bin/fairseq-train", line 8, in
sys.exit(cli_main())
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq_cli/train.py", line 574, in cli_main
distributed_utils.call_main(cfg, main)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/distributed/utils.py", line 404, in call_main
main(cfg, **kwargs)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq_cli/train.py", line 96, in main
model = task.build_model(cfg.model)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/tasks/speech_to_text.py", line 170, in build_model
return super(SpeechToTextTask, self).build_model(args, from_checkpoint)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/tasks/fairseq_task.py", line 691, in build_model
model = models.build_model(args, self, from_checkpoint)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/models/init.py", line 106, in build_model
return model.build_model(cfg, task)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/models/speech_to_text/xm_transformer.py", line 646, in build_model
decoder_args_dict = cls.get_decoder_args_from_checkpoint(ckpt["cfg"])
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/models/speech_to_text/xm_transformer.py", line 602, in get_decoder_args_from_checkpoint
for k, v in ckpt_args["model"].dict.items():
AttributeError: 'dict' object has no attribute 'dict'
When attempting to train a model using Fairseq, I encountered an AttributeError during the training process. The error occurred after printing information about the dictionary size and seems to be related to the model building process.
2024-04-08 11:29:29 | INFO | fairseq.tasks.speech_to_text | dictionary size (dict.txt): 1,007 Traceback (most recent call last): File "/home/hp/miniconda3/envs/test_fairseq/bin/fairseq-train", line 8, in
sys.exit(cli_main())
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq_cli/train.py", line 574, in cli_main
distributed_utils.call_main(cfg, main)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/distributed/utils.py", line 404, in call_main
main(cfg, **kwargs)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq_cli/train.py", line 96, in main
model = task.build_model(cfg.model)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/tasks/speech_to_text.py", line 170, in build_model
return super(SpeechToTextTask, self).build_model(args, from_checkpoint)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/tasks/fairseq_task.py", line 691, in build_model
model = models.build_model(args, self, from_checkpoint)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/models/init.py", line 106, in build_model
return model.build_model(cfg, task)
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/models/speech_to_text/xm_transformer.py", line 646, in build_model
decoder_args_dict = cls.get_decoder_args_from_checkpoint(ckpt["cfg"])
File "/media/hp/New_Volume/aktar/test_fairseq/fairseq/fairseq/models/speech_to_text/xm_transformer.py", line 602, in get_decoder_args_from_checkpoint
for k, v in ckpt_args["model"].dict.items():
AttributeError: 'dict' object has no attribute 'dict'