Unverified Commit 9ef5256d authored by Apoorv Khandelwal's avatar Apoorv Khandelwal Committed by GitHub
Browse files

Fallback for missing attribute `Parameter.ds_numel` (#24942)

* [trainer] fallback for deepspeed param count

* [trainer] more readable numel count
parent caf5e369
......@@ -1043,7 +1043,7 @@ def get_model_param_count(model, trainable_only=False):
if is_deepspeed_zero3_enabled():
def numel(p):
return p.ds_numel
return p.ds_numel if hasattr(p, "ds_numel") else p.numel()
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment