File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,13 @@ def initialize(self, args):
172172 )
173173 self ._is_healthy = True
174174
175+ # Check if metrics are enabled. The ZMQ process cannot be used when metrics are
176+ # enabled.
177+ self ._enable_metrics = (
178+ self ._get_bool_config_param ("REPORT_CUSTOM_METRICS" )
179+ and not self ._aync_engine_args .disable_log_stats
180+ )
181+
175182 # Starting the vLLM engine and its event thread running the AsyncIO event loop.
176183 self ._init_engine ()
177184
@@ -238,16 +245,10 @@ async def _run_llm_engine(self):
238245 # Counter to keep track of ongoing request counts.
239246 self ._ongoing_request_count = 0
240247
241- # Check if metrics are enabled. The ZMQ process cannot be used when metrics are
242- # enabled.
243- self ._enable_metrics = (
244- self ._get_bool_config_param ("REPORT_CUSTOM_METRICS" )
245- and not self ._aync_engine_args .disable_log_stats
246- )
247-
248248 try :
249249 # Start the vLLM engine. The engine lives for the scope of this with
250250 # statement.
251+ # TODO: Metrics should work with ZMQ enabled.
251252 async with build_async_engine_client_from_engine_args (
252253 engine_args = self ._aync_engine_args ,
253254 disable_frontend_multiprocessing = self ._enable_metrics ,
You can’t perform that action at this time.
0 commit comments