Skip to content

Commit abfedb9

Browse files
save args
Signed-off-by: zhangsmallshark <zhangsmallshark@gmail.com>
1 parent b436bd4 commit abfedb9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

training/DeepSpeed-Domino/domino/arguments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def parse_args():
218218
help='Do not load optimizer when loading checkpoint.')
219219
parser.add_argument('--no-load-rng', action='store_true', default=None,
220220
help='Do not load rng state when loading checkpoint.')
221-
group.add_argument('--exit-on-missing-checkpoint', action='store_true',
221+
parser.add_argument('--exit-on-missing-checkpoint', action='store_true',
222222
help="If '--load' is set, but checkpoint is not found "
223223
"(e.g., path typo), then exit instead of random "
224224
"initialization.")

training/DeepSpeed-Domino/megatron/checkpointing.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ def save_checkpoint(iteration, model, optimizer, opt_param_scheduler):
247247

248248
# Arguments, iteration, and model.
249249
state_dict = {}
250-
# state_dict['args'] = args
250+
t_args = args
251+
t_args.init_method = None
252+
t_args.output_layer_init_method = None
253+
state_dict['args'] = t_args
251254
state_dict['checkpoint_version'] = 3.0
252255
state_dict['iteration'] = iteration
253256
if len(model) == 1:

0 commit comments

Comments
 (0)