Skip to content

Commit b9837e4

Browse files
committed
fix: deal with DeepSpeedSummary
1 parent be6c17a commit b9837e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lightning/pytorch/callbacks/model_summary.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ def on_fit_start(self, trainer: "pl.Trainer", pl_module: "pl.LightningModule") -
6767
trainable_parameters = model_summary.trainable_parameters
6868
model_size = model_summary.model_size
6969
total_training_modes = model_summary.total_training_modes
70-
total_flops = model_summary.total_flops
70+
71+
# todo Add `total_flops` in DeepSpeedSummary.
72+
total_flops = model_summary.total_flops if hasattr(model_summary, "total_flops") else 0
7173

7274
if trainer.is_global_zero:
7375
self.summarize(

0 commit comments

Comments
 (0)