Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Aug 4, 2024
1 parent 2aed8db commit d4cdde4
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ def get_human_readable_count(number: int) -> str:
def _tensor_has_shape(p: Tensor) -> bool:
from torch.nn.parameter import UninitializedParameter

# DTensor is a subtype of `UninitializedParameter`, but the shape is known
if isinstance(p, UninitializedParameter) and not _is_dtensor(p):
warning_cache.warn(
"The total number of parameters detected may be inaccurate because the model contains"
Expand Down

0 comments on commit d4cdde4

Please sign in to comment.