From 1596f6f414f6f41da66506debb1dff19fffeb3ec Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 24 六月 2024 11:55:17 +0800
Subject: [PATCH] fixbug hotwords

---
 funasr/train_utils/trainer_ds.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/funasr/train_utils/trainer_ds.py b/funasr/train_utils/trainer_ds.py
index 8a0679c..85513a5 100644
--- a/funasr/train_utils/trainer_ds.py
+++ b/funasr/train_utils/trainer_ds.py
@@ -30,8 +30,9 @@
             yield
     else:
         if dtype == torch.float16 or dtype == torch.bfloat16:
-            with autocast(enabled=True, dtype=dtype):
-                yield
+            yield
+            # with autocast(enabled=True, dtype=dtype):
+            #     yield
         else:
             yield
 
@@ -477,7 +478,7 @@
                             for k_ex in self.excludes:
                                 k_tmp = k.replace("module.", "")
                                 if k_tmp.startswith(k_ex):
-                                    logging.info(f"key: {{k}} matching: {k_ex}, excluded")
+                                    logging.info(f"key: {k} matching: {k_ex}, excluded")
                                     excludes_flag = True
                                     break
                         if excludes_flag:

--
Gitblit v1.9.1