From 7a9c4a62875efd56d5c2fefa9e6c4eeacea2203b Mon Sep 17 00:00:00 2001 From: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com> Date: Fri, 2 Dec 2022 09:56:29 +0530 Subject: [PATCH] fix --- src/pet/utils/other.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pet/utils/other.py b/src/pet/utils/other.py index 0b63248..b7a81d5 100644 --- a/src/pet/utils/other.py +++ b/src/pet/utils/other.py @@ -57,7 +57,7 @@ def fsdp_auto_wrap_policy(model): def lambda_policy_fn(module): if ( - len(module.named_children()) == 0 + len(list(module.named_children())) == 0 and getattr(module, "weight", None) is not None and module.weight.requires_grad ):