[Minor] Improve the function organization in TokenizerManager & improve loggers (#1208)
This commit is contained in:
@@ -123,7 +123,7 @@ def create_streaming_error_response(
|
||||
def load_chat_template_for_openai_api(tokenizer_manager, chat_template_arg):
|
||||
global chat_template_name
|
||||
|
||||
print(f"Use chat template: {chat_template_arg}")
|
||||
logger.info(f"Use chat template: {chat_template_arg}")
|
||||
if not chat_template_exists(chat_template_arg):
|
||||
if not os.path.exists(chat_template_arg):
|
||||
raise RuntimeError(
|
||||
@@ -355,7 +355,7 @@ async def process_batch(tokenizer_manager, batch_id: str, batch_request: BatchRe
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
print("error in SGLang:", e)
|
||||
logger.error("error in SGLang:", e)
|
||||
# Update batch status to "failed"
|
||||
retrieve_batch = batch_storage[batch_id]
|
||||
retrieve_batch.status = "failed"
|
||||
|
||||
Reference in New Issue
Block a user