Pedro Cuenca commited on
Commit
5ec61cc
1 Parent(s): 1023afa

Use model configuration unless a specific one is supplied.

Browse files

`from_pretrained` downloads the saved configuration if available, see
https://github.com/huggingface/transformers/blob/v4.15.0/src/transformers/modeling_utils.py#L1262.

Files changed (1) hide show
  1. tools/train/train.py +1 -1
tools/train/train.py CHANGED
@@ -458,7 +458,7 @@ def main():
458
  if model_args.config_name:
459
  config = DalleBartConfig.from_pretrained(model_args.config_name)
460
  else:
461
- config = DalleBartConfig.from_pretrained(model_args.model_name_or_path)
462
 
463
  # Load or create new model
464
  if model_args.model_name_or_path:
 
458
  if model_args.config_name:
459
  config = DalleBartConfig.from_pretrained(model_args.config_name)
460
  else:
461
+ config = None
462
 
463
  # Load or create new model
464
  if model_args.model_name_or_path: