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(
1361
1361
"Saving a checkpoint is only possible if a model is attached to the Trainer. Did you call"
1362
1362
" `Trainer.save_checkpoint()` before calling `Trainer.{fit,validate,test,predict}`?"
1363
1363
)
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" )
1367
1368
1368
1369
"""
1369
1370
State properties
You can’t perform that action at this time.
0 commit comments