megatron.checkpointing.load_args_from_checkpoint#
- megatron.checkpointing.load_args_from_checkpoint(args, load_arg='load')#
Set required arguments from the checkpoint specified in the arguments.
Will overwrite arguments that have a non-None default value, but will leave any arguments that default to None as set.
Returns the same args NameSpace with the new values added/updated.
If no checkpoint is specified in args, or if the checkpoint is there but invalid, the arguments will not be modified