File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,8 @@ def setup(
101101 print_rank_0 ("time to initialize megatron (seconds): {:.3f}" .format (time .time () - state .start_time ))
102102 barrier_and_log ("after megatron is initialized" )
103103
104+ checkpointing_context = _init_checkpointing_context (cfg )
105+
104106 # Tokenizer
105107 timers ("tokenizer-setup" , log_level = 0 ).start (barrier = True )
106108 tokenizer = build_tokenizer (
@@ -136,8 +138,6 @@ def setup(
136138 timers ("model-and-optimizer-setup" ).stop ()
137139 barrier_and_log ("after model, optimizer, and learning rate scheduler are built" )
138140
139- checkpointing_context = _init_checkpointing_context (cfg )
140-
141141 # Load checkpoint if applicable
142142 if (cfg .checkpoint_config .load is not None or cfg .checkpoint_config .pretrained_checkpoint is not None ) and (
143143 checkpoint_exists (cfg .checkpoint_config .load ) or checkpoint_exists (cfg .checkpoint_config .pretrained_checkpoint )
You can’t perform that action at this time.
0 commit comments