Initializes the LLMEngine with the provided configuration. Args: cfg (Config): Config object containing all the configuration parameters.
(self, cfg)
| 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 | """ |
nothing calls this directly
no test coverage detected