From 8f79144a9543247f2418fc1ed5ead79faaedd76b Mon Sep 17 00:00:00 2001 From: AllentDan <41138331+AllentDan@users.noreply.github.com> Date: Thu, 16 May 2024 15:36:47 +0800 Subject: [PATCH] fix logger init (#1598) --- lmdeploy/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmdeploy/utils.py b/lmdeploy/utils.py index fa20debdaf..0a49590977 100644 --- a/lmdeploy/utils.py +++ b/lmdeploy/utils.py @@ -265,6 +265,7 @@ def _get_and_verify_max_len( max_model_len: Optional[int], ) -> int: """Get and verify the model's maximum length.""" + logger = get_logger('lmdeploy') derived_max_model_len = float('inf') possible_keys = [ # OPT @@ -295,7 +296,6 @@ def _get_and_verify_max_len( return max_model_len default_max_len = 2048 - logger = get_logger('lmdeploy') logger.warning( "The model's config.json does not contain any of the following " 'keys to determine the original maximum length of the model: '