Error in converting Fairseq Wikitext-103 transformer_lm model

When converting to ctranslate2 a fairseq transformer_lm model trained on Wikitext-103, I get a ConfigAttributeError:

Traceback (most recent call last):
File “/usr/local/bin/ct2-fairseq-converter”, line 8, in
sys.exit(main())
File “/usr/local/lib/python3.8/dist-packages/ctranslate2/converters/fairseq.py”, line 341, in main
converter.convert_from_args(args)
File “/usr/local/lib/python3.8/dist-packages/ctranslate2/converters/converter.py”, line 50, in convert_from_args
return self.convert(
File “/usr/local/lib/python3.8/dist-packages/ctranslate2/converters/converter.py”, line 89, in convert
model_spec = self._load()
File “/usr/local/lib/python3.8/dist-packages/ctranslate2/converters/fairseq.py”, line 152, in _load
args.data = self._data_dir
File “/usr/local/lib/python3.8/dist-packages/omegaconf/dictconfig.py”, line 285, in setattr
raise e
File “/usr/local/lib/python3.8/dist-packages/omegaconf/dictconfig.py”, line 282, in setattr
self.__set_impl(key, value)
File “/usr/local/lib/python3.8/dist-packages/omegaconf/dictconfig.py”, line 266, in __set_impl
self._set_item_impl(key, value)
File “/usr/local/lib/python3.8/dist-packages/omegaconf/basecontainer.py”, line 398, in _set_item_impl
self._validate_set(key, value)
File “/usr/local/lib/python3.8/dist-packages/omegaconf/dictconfig.py”, line 143, in _validate_set
self._validate_set_merge_impl(key, value, is_assign=True)
File “/usr/local/lib/python3.8/dist-packages/omegaconf/dictconfig.py”, line 176, in _validate_set_merge_impl
target = self._get_node(key)
File “/usr/local/lib/python3.8/dist-packages/omegaconf/dictconfig.py”, line 383, in _get_node
self._validate_get(key)
File “/usr/local/lib/python3.8/dist-packages/omegaconf/dictconfig.py”, line 135, in _validate_get
self._format_and_raise(
File “/usr/local/lib/python3.8/dist-packages/omegaconf/base.py”, line 95, in _format_and_raise
format_and_raise(
File “/usr/local/lib/python3.8/dist-packages/omegaconf/_utils.py”, line 694, in format_and_raise
_raise(ex, cause)
File “/usr/local/lib/python3.8/dist-packages/omegaconf/_utils.py”, line 610, in _raise
raise ex # set end OC_CAUSE=1 for full backtrace
omegaconf.errors.ConfigAttributeError: Key ‘data’ is not in struct
full_key: model.data
reference_type=Any
object_type=dict

Other fairseq Transformer models are converted just fine.

Any hint on how to solve the issue?

Thank you,

Giuliano

One reason might be that the trained model’s ‘args’ value is empty, whereas it is full of data in the pretrained WMT19 language model used an example in CTranslate2 documentation. Yet the model seems to work in fairseq, so it is supposed to be a valid transformer_lm model.

Puzzling.