Skip to content

Commit 503c33b

Browse files
committed
fix
1 parent b4d7d1e commit 503c33b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/pytorch/utilities/model_summary/model_summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def __init__(self, model: "pl.LightningModule", max_depth: int = 1) -> None:
238238
"32-true": 32,
239239
"64-true": 64,
240240
}
241-
if self._model.trainer is not None and self._model.trainer.precision not in precision_to_bits:
241+
if self._model._trainer and self._model.trainer.precision not in precision_to_bits:
242242
rank_zero_warn(
243243
f"Precision {self._model.trainer.precision} is not supported by the model summary. "
244244
" Estimated model size in MB will not be accurate. Using 32 bits instead.",

0 commit comments

Comments
 (0)