diff --git a/fastNLP/core/utils/utils.py b/fastNLP/core/utils/utils.py index 66159f24..73267e7f 100644 --- a/fastNLP/core/utils/utils.py +++ b/fastNLP/core/utils/utils.py @@ -181,7 +181,7 @@ def check_user_specific_params(user_params: Dict, fn: Callable): return user_params -def dataclass_to_dict(data: "dataclass") -> Dict: +def dataclass_to_dict(data: "dataclasses.dataclass") -> Dict: if not is_dataclass(data): raise TypeError(f"Parameter `data` can only be `dataclass` type instead of {type(data)}.") _dict = dict()