From ac77e3bf5f91831313d5e70eb985b2e345cdc2a2 Mon Sep 17 00:00:00 2001
From: duzx16 <zx-du20@mails.tsinghua.edu.cn>
Date: Mon, 13 Dec 2021 17:01:14 +0800
Subject: [PATCH] Fix typo in collect_hooks_

---
 SwissArmyTransformer/model/base_model.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SwissArmyTransformer/model/base_model.py b/SwissArmyTransformer/model/base_model.py
index 61543f5..50fe202 100644
--- a/SwissArmyTransformer/model/base_model.py
+++ b/SwissArmyTransformer/model/base_model.py
@@ -115,7 +115,7 @@ class BaseModel(torch.nn.Module):
             for mixin_name, m in self.mixins.items():
                 if hasattr(m, name):
                     if name in hooks: # if this hook name is already registered
-                        if hasattr(getattr(m, name), 'non_confict'):
+                        if hasattr(getattr(m, name), 'non_conflict'):
                             hooks[name] = partial(getattr(m, name), old_impl=hooks[name])
                             hook_origins[name] = mixin_name + ' -> ' + hook_origins[name]
                         else: # conflict
-- 
GitLab