From 98abc0e5ac1a1da0fe1802d9ffb623802fbf0b2f Mon Sep 17 00:00:00 2001
From: jmwang66 <wangjiaming.wjm@alibaba-inc.com>
Date: 星期四, 29 六月 2023 16:30:39 +0800
Subject: [PATCH] update setup (#686)
---
funasr/tasks/lm.py | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/funasr/tasks/lm.py b/funasr/tasks/lm.py
index 44fdf8e..c0259a8 100644
--- a/funasr/tasks/lm.py
+++ b/funasr/tasks/lm.py
@@ -9,8 +9,6 @@
import numpy as np
import torch
-from typeguard import check_argument_types
-from typeguard import check_return_type
from funasr.datasets.collate_fn import CommonCollateFn
from funasr.datasets.preprocessor import CommonPreprocessor
@@ -52,7 +50,6 @@
@classmethod
def add_task_arguments(cls, parser: argparse.ArgumentParser):
# NOTE(kamo): Use '_' instead of '-' to avoid confusion
- assert check_argument_types()
group = parser.add_argument_group(description="Task related")
# NOTE(kamo): add_arguments(..., required=True) can't be used
@@ -130,7 +127,6 @@
for class_choices in cls.class_choices_list:
class_choices.add_arguments(group)
- assert check_return_type(parser)
return parser
@classmethod
@@ -140,14 +136,12 @@
[Collection[Tuple[str, Dict[str, np.ndarray]]]],
Tuple[List[str], Dict[str, torch.Tensor]],
]:
- assert check_argument_types()
return CommonCollateFn(int_pad_value=0)
@classmethod
def build_preprocess_fn(
cls, args: argparse.Namespace, train: bool
) -> Optional[Callable[[str, Dict[str, np.array]], Dict[str, np.ndarray]]]:
- assert check_argument_types()
if args.use_preprocessor:
retval = CommonPreprocessor(
train=train,
@@ -160,7 +154,6 @@
)
else:
retval = None
- assert check_return_type(retval)
return retval
@classmethod
@@ -179,7 +172,6 @@
@classmethod
def build_model(cls, args: argparse.Namespace) -> LanguageModel:
- assert check_argument_types()
if isinstance(args.token_list, str):
with open(args.token_list, encoding="utf-8") as f:
token_list = [line.rstrip() for line in f]
--
Gitblit v1.9.1