File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/lightning/pytorch/trainer Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1361,9 +1361,10 @@ def save_checkpoint(
13611361 "Saving a checkpoint is only possible if a model is attached to the Trainer. Did you call"
13621362 " `Trainer.save_checkpoint()` before calling `Trainer.{fit,validate,test,predict}`?"
13631363 )
1364- checkpoint = self ._checkpoint_connector .dump_checkpoint (weights_only )
1365- self .strategy .save_checkpoint (checkpoint , filepath , storage_options = storage_options )
1366- self .strategy .barrier ("Trainer.save_checkpoint" )
1364+ with self .profiler .profile ("save_checkpoint" ):
1365+ checkpoint = self ._checkpoint_connector .dump_checkpoint (weights_only )
1366+ self .strategy .save_checkpoint (checkpoint , filepath , storage_options = storage_options )
1367+ self .strategy .barrier ("Trainer.save_checkpoint" )
13671368
13681369 """
13691370 State properties
You can’t perform that action at this time.
0 commit comments