From 397e9489849d80517b0c467852a7092a0a9626f2 Mon Sep 17 00:00:00 2001 From: Shaowen Wang Date: Thu, 16 Nov 2023 20:12:35 -0600 Subject: [PATCH] Fix: Change rouge-chinese package name to rouge_chinese To reproduce: python: importlib.util.find_spec('rouge-chinese') -> None importlib.util.find_spec('rouge_chinese') -> ModuleSpec(name='rouge_chinese'...) from rouge_chinese import Rouge print(Rouge.__module__) -> rouge_chinese --- src/llmtuner/extras/packages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llmtuner/extras/packages.py b/src/llmtuner/extras/packages.py index 26df247b..2e60e690 100644 --- a/src/llmtuner/extras/packages.py +++ b/src/llmtuner/extras/packages.py @@ -18,7 +18,7 @@ _flash_attn2_available = is_package_available("flash_attn") and get_package_vers _jieba_available = is_package_available("jieba") _matplotlib_available = is_package_available("matplotlib") _nltk_available = is_package_available("nltk") -_rouge_available = is_package_available("rouge-chinese") +_rouge_available = is_package_available("rouge_chinese") _starlette_available = is_package_available("sse-starlette") _uvicorn_available = is_package_available("uvicorn")