|
7 | 7 | import os |
8 | 8 | from argparse import Namespace |
9 | 9 | from http import HTTPStatus |
10 | | -from logging import Logger |
11 | 10 |
|
12 | 11 | import regex as re |
13 | 12 | from fastapi import Request |
14 | 13 | from fastapi.responses import JSONResponse, StreamingResponse |
15 | 14 | from starlette.background import BackgroundTask, BackgroundTasks |
16 | 15 |
|
17 | | -from aphrodite import envs |
18 | 16 | from aphrodite.engine.arg_utils import EngineArgs |
19 | 17 | from aphrodite.entrypoints.generate.base.protocol import StreamOptions |
20 | 18 | from aphrodite.entrypoints.openai.models.protocol import LoRAModulePath |
21 | 19 | from aphrodite.entrypoints.serve.engine.protocol import ErrorInfo, ErrorResponse |
22 | 20 | from aphrodite.exceptions import GenerationError |
23 | | -from aphrodite.logger import current_formatter_type, init_logger |
| 21 | +from aphrodite.logger import init_logger |
24 | 22 | from aphrodite.platforms import current_platform |
25 | 23 | from aphrodite.utils.argparse_utils import FlexibleArgumentParser |
26 | 24 |
|
@@ -257,25 +255,6 @@ def sanitize_message(message: str) -> str: |
257 | 255 | return message.strip() |
258 | 256 |
|
259 | 257 |
|
260 | | -def log_version_and_model(lgr: Logger, version: str, model_name: str) -> None: |
261 | | - logo = r""" |
262 | | - ▄▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄▄▄ ▄▄▄ ▄▄▄▄ ▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄ |
263 | | - ██▀██ ██▄█▀ ██▄██ ██▄█▄ ██▀██ ██▀██ ██ ██ ██▄▄ |
264 | | - ██▀██ ██ ██ ██ ██ ██ ▀███▀ ████▀ ██ ██ ██▄▄▄ |
265 | | - |
266 | | - """ |
267 | | - if envs.APHRODITE_DISABLE_LOG_LOGO or current_formatter_type(lgr) is None: |
268 | | - message = "Aphrodite server version %s, serving model %s" |
269 | | - lgr.info(message, version, model_name) |
270 | | - else: |
271 | | - logo_lines = logo.splitlines() |
272 | | - logo_width = max((len(line.rstrip()) for line in logo_lines if line.strip()), default=0) |
273 | | - version_line = f"version: {version}".center(logo_width) |
274 | | - model_line = f"model: {model_name}".center(logo_width) |
275 | | - message = f"\n{logo}\n{version_line}\n{model_line}\n" |
276 | | - lgr.info("%s", message) |
277 | | - |
278 | | - |
279 | 258 | def create_error_response( |
280 | 259 | message: str | Exception, |
281 | 260 | err_type: str = "BadRequestError", |
|
0 commit comments