File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
nemo_rl/models/generation/vllm Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,9 @@ def _patch_vllm_init_workers_ray():
332332 # Optionally start periodic vLLM metrics logging if the flag is set
333333 # NOTE: vLLM metrics logger is only supported with async engine enabled
334334 # Metrics logger only enabled for per-actor, model-owner only
335+ # Thread synchronization for metrics access
336+ self ._vllm_metrics_lock = threading .Lock ()
337+
335338 if self .cfg ["vllm_cfg" ].get ("enable_vllm_metrics_logger" , False ) and self .cfg [
336339 "vllm_cfg"
337340 ].get ("async_engine" , False ):
@@ -366,9 +369,6 @@ def _start_vllm_metrics_logger(self) -> None:
366369 stop_event = threading .Event ()
367370 self ._vllm_metrics_logger_stop_event = stop_event
368371
369- # Thread synchronization for metrics access
370- self ._vllm_metrics_lock = threading .Lock ()
371-
372372 self .inflight_batch_sizes : list [int ] = []
373373 self .num_pending_samples : list [int ] = []
374374
You can’t perform that action at this time.
0 commit comments