Skip to content

Commit 241ae39

Browse files
authored
zero_to_fp32 script adds support for tag argument (#4089)
1 parent 85dc854 commit 241ae39

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

deepspeed/utils/zero_to_fp32.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,14 @@ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
574574
"output_file",
575575
type=str,
576576
help="path to the pytorch fp32 state_dict output file (e.g. path/checkpoint-12/pytorch_model.bin)")
577+
parser.add_argument("-t",
578+
"--tag",
579+
type=str,
580+
default=None,
581+
help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
577582
parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
578583
args = parser.parse_args()
579584

580585
debug = args.debug
581586

582-
convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_file)
587+
convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_file, tag=args.tag)

0 commit comments

Comments
 (0)