Skip to content

Commit

Permalink
use logger.error directly
Browse files Browse the repository at this point in the history
  • Loading branch information
robertgshaw2-redhat committed Dec 29, 2024
1 parent 7c5b564 commit acbe6e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions vllm/engine/llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ def _add_processed_request(
decoder_inputs = processed_inputs
encoder_inputs = None

print(f"{decoder_inputs=}")
seq = Sequence(seq_id, decoder_inputs, block_size, eos_token_id,
lora_request, prompt_adapter_request)

Expand Down
3 changes: 3 additions & 0 deletions vllm/entrypoints/openai/serving_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,16 @@ async def create_completion(

tokenizer = await self.engine_client.get_tokenizer(lora_request)

print(f"{request.prompt=}")
request_prompts, engine_prompts = await self._preprocess_completion(
request,
tokenizer,
request.prompt,
truncate_prompt_tokens=request.truncate_prompt_tokens,
add_special_tokens=request.add_special_tokens,
)
print(f"{request_prompts=}")
print(f"{engine_prompts=}")
except ValueError as e:
logger.exception("Error in preprocessing prompt inputs")
return self.create_error_response(str(e))
Expand Down
2 changes: 2 additions & 0 deletions vllm/transformers_utils/tokenizer_group/tokenizer_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def encode(self,
request_id: Optional[str] = None,
lora_request: Optional[LoRARequest] = None) -> List[int]:
tokenizer = self.get_lora_tokenizer(lora_request)
print(f"{prompt=}")
ret = tokenizer.encode(prompt)
print(f"{ret=}")
self._raise_if_input_too_long(ret, lora_request)
return ret

Expand Down
7 changes: 3 additions & 4 deletions vllm/v1/engine/async_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from vllm.transformers_utils.tokenizer import AnyTokenizer
from vllm.transformers_utils.tokenizer_group import init_tokenizer_from_configs
from vllm.usage.usage_lib import UsageContext
from vllm.utils import get_exception_traceback, kill_process_tree
from vllm.utils import kill_process_tree
from vllm.v1.engine.core_client import EngineCoreClient
from vllm.v1.engine.detokenizer import Detokenizer
from vllm.v1.engine.processor import Processor
Expand Down Expand Up @@ -293,9 +293,8 @@ async def _run_output_handler(self):
# 4) Abort any requests that finished due to stop strings.
await self.engine_core.abort_requests_async(reqs_to_abort)

except Exception:
traceback = get_exception_traceback()
logger.error("EngineCore hit an exception: %s", traceback)
except Exception as e:
logger.error(e)
kill_process_tree(os.getpid())

async def abort(self, request_id: str) -> None:
Expand Down

0 comments on commit acbe6e3

Please sign in to comment.