omry / omegaconf

Flexible Python configuration system. The last one you will ever need.
BSD 3-Clause "New" or "Revised" License
1.94k stars 105 forks source link

omegaconf.errors.ValidationError: Cannot convert 'DictConfig' to string #1065

Closed FayeXXX closed 1 year ago

FayeXXX commented 1 year ago

Describe the bug when i used fairseq to load a pretrained model, an error occured:

omegaconf.errors.ValidationError: Cannot convert 'DictConfig' to string: '{'_name': 'gpt2', 'gpt2_encoder_json': 'https://dl.fbaipublicfiles.com/fairseq/gpt2_bpe/encoder.json', 'gpt2_vocab_bpe': 'https://dl.fbaipublicfiles.com/fairseq/gpt2_bpe/vocab.bpe'}'
full_key: bpe object_type=DenoisingConfig

To Reproduce

from fairseq.models.bart import BARTModel

d1_bart = BARTModel.from_pretrained(
        d1_path,
        checkpoint_file=args.d1_model_path.split("/")[-1],
        data_name_or_path=d1_data_bin,
    )
omry commented 1 year ago

You need to file this against fairseq.