-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Closed
Description
The examples/pytorch/language-modeling/run_mlm_no_trainer.py script has
parser.add_argument(
"--model_name_or_path",
type=str,
help="Path to pretrained model or model identifier from huggingface.co/models.",
default=None,
required=True,
)
Despite there being several checks in the code implying it may be None ie
if args.model_name_or_path:
model = AutoModelForMaskedLM.from_pretrained(
args.model_name_or_path,
from_tf=bool(".ckpt" in args.model_name_or_path),
config=config,
)
else:
logger.info("Training new model from scratch")
model = AutoModelForMaskedLM.from_config(config)
As far as I can see it's optional, falling back to training a new model from scratch - just like run_mlm.py (I commented out required=True without any obvious issues).
Metadata
Metadata
Assignees
Labels
No labels