MCPcopy Index your code
hub / github.com/PaddlePaddle/FastDeploy / __init__

Method __init__

fastdeploy/engine/engine.py:81–103  ·  view source on GitHub ↗

Initializes the LLMEngine with the provided configuration. Args: cfg (Config): Config object containing all the configuration parameters.

(self, cfg)

Source from the content-addressed store, hash-verified

79 return cls(cfg=config)
80
81 def __init__(self, cfg):
82 """
83 Initializes the LLMEngine with the provided configuration.
84
85 Args:
86 cfg (Config): Config object containing all the configuration parameters.
87 """
88 self.cfg = cfg
89 self.cfg.print()
90 self.running = True
91 self.is_started = False
92
93 self.engine = EngineService(cfg)
94
95 if self.cfg.cache_config.num_gpu_blocks_override is None:
96 self.do_profile = 1
97 else:
98 self.do_profile = 0
99 self._finalizer = weakref.finalize(self, self._exit_sub_services)
100
101 main_process_metrics.set_cache_config_info(obj=self.cfg.cache_config)
102
103 tracing.trace_set_thread_info("engine")
104
105 def start(self, api_server_pid=None):
106 """

Callers

nothing calls this directly

Calls 3

EngineServiceClass · 0.90
set_cache_config_infoMethod · 0.80
printMethod · 0.45

Tested by

no test coverage detected