mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-01-28 01:14:09 -05:00
chore: update support development_mode as DEBUG and support for RELOAD
envvar Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
@@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
import os, logging, traceback, pathlib, sys, fs, click, enum, inflection, bentoml, orjson, openllm, openllm_core, platform, typing as t
|
||||
from ._helpers import recommended_instance_type
|
||||
from openllm_core.utils import (
|
||||
DEBUG,
|
||||
DEBUG_ENV_VAR,
|
||||
QUIET_ENV_VAR,
|
||||
SHOW_CODEGEN,
|
||||
@@ -286,7 +287,7 @@ def start_command(
|
||||
sys.path.insert(0, working_dir)
|
||||
service = load('.', working_dir=working_dir)
|
||||
service.inject_config()
|
||||
serve_http('.', working_dir=working_dir)
|
||||
serve_http('.', working_dir=working_dir, reload=check_bool_env('RELOAD', default=False), development_mode=DEBUG)
|
||||
|
||||
|
||||
def construct_python_options(llm_config, llm_fs):
|
||||
|
||||
@@ -26,7 +26,7 @@ except Exception:
|
||||
llm_config = core.AutoConfig.for_model(svars.model_name)
|
||||
GenerationInput = core.GenerationInput.from_config(llm_config)
|
||||
|
||||
app_v1 = FastAPI(debug=True, description='OpenAI Compatible API support')
|
||||
app_v1 = FastAPI(description='OpenAI Compatible API support')
|
||||
|
||||
|
||||
@bentoml.mount_asgi_app(app_v1)
|
||||
@@ -160,7 +160,3 @@ class LLMService:
|
||||
return ModelList(
|
||||
data=[ModelCard(root=core.utils.normalise_model_name(model_id), id=core.utils.normalise_model_name(model_id))]
|
||||
)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
LLMService.serve_http(reload=core.utils.check_bool_env('RELOAD', False))
|
||||
|
||||
Reference in New Issue
Block a user