MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / load_data_service

Function load_data_service

fastdeploy/entrypoints/openai/api_server.py:148–164  ·  view source on GitHub ↗

load data service

()

Source from the content-addressed store, hash-verified

146
147
148def load_data_service():
149 """
150 load data service
151 """
152 global llm_engine
153 if llm_engine is not None:
154 return llm_engine
155 api_server_logger.info(f"FastDeploy LLM API server starting... {os.getpid()}, port: {args.port}")
156 engine_args = EngineArgs.from_cli_args(args)
157 config = engine_args.create_engine_config()
158 api_server_logger.info(f"local_data_parallel_id: {config.parallel_config}")
159 expert_service = ExpertService(config, config.parallel_config.local_data_parallel_id)
160 if not expert_service.start(args.port, config.parallel_config.local_data_parallel_id):
161 api_server_logger.error("Failed to initialize FastDeploy LLM expert service, service exit now!")
162 return None
163 llm_engine = expert_service
164 return expert_service
165
166
167@asynccontextmanager

Callers 1

mainFunction · 0.85

Calls 6

startMethod · 0.95
ExpertServiceClass · 0.90
from_cli_argsMethod · 0.80
infoMethod · 0.45
create_engine_configMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected