From a5e3c8bc731e7b56c0a4237035266d5fe707654a Mon Sep 17 00:00:00 2001 From: Chujie Zheng Date: Wed, 6 Mar 2024 12:51:42 -0800 Subject: [PATCH 1/2] Add `dynamic_ncols=True` --- vllm/entrypoints/llm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vllm/entrypoints/llm.py b/vllm/entrypoints/llm.py index 62f1d172377f6..d90f23d69ac8c 100644 --- a/vllm/entrypoints/llm.py +++ b/vllm/entrypoints/llm.py @@ -191,7 +191,8 @@ def _run_engine(self, use_tqdm: bool) -> List[RequestOutput]: # Initialize tqdm. if use_tqdm: num_requests = self.llm_engine.get_num_unfinished_requests() - pbar = tqdm(total=num_requests, desc="Processed prompts") + pbar = tqdm(total=num_requests, desc="Processed prompts", + dynamic_ncols=True) # Run the engine. outputs: List[RequestOutput] = [] while self.llm_engine.has_unfinished_requests(): From 354be5246fd52b603b672fb53ca25bc4ef66fec0 Mon Sep 17 00:00:00 2001 From: Chujie Zheng Date: Wed, 6 Mar 2024 13:36:01 -0800 Subject: [PATCH 2/2] fix yapf --- vllm/entrypoints/llm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vllm/entrypoints/llm.py b/vllm/entrypoints/llm.py index d90f23d69ac8c..1f463bdaaedc3 100644 --- a/vllm/entrypoints/llm.py +++ b/vllm/entrypoints/llm.py @@ -191,7 +191,8 @@ def _run_engine(self, use_tqdm: bool) -> List[RequestOutput]: # Initialize tqdm. if use_tqdm: num_requests = self.llm_engine.get_num_unfinished_requests() - pbar = tqdm(total=num_requests, desc="Processed prompts", + pbar = tqdm(total=num_requests, + desc="Processed prompts", dynamic_ncols=True) # Run the engine. outputs: List[RequestOutput] = []