Skip to content

Commit

Permalink
fix start/stop
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mkeralapura committed Sep 6, 2024
1 parent b6f8764 commit 098f90f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vllm/worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,16 @@ def __init__(
self.profiler = None

def start_profile(self):
if self.is_driver_worker and self.profiler is None:
if self.profiler is None:
raise RuntimeError("Profiler is not enabled.")
self.profiler.start()
if self.is_driver_worker:
self.profiler.start()

def stop_profile(self):
if self.is_driver_worker and self.profiler is None:
if self.profiler is None:
raise RuntimeError("Profiler is not enabled.")
self.profiler.stop()
if self.is_driver_worker:
self.profiler.stop()

def _is_encoder_decoder_model(self):
return self.model_config.is_encoder_decoder_model
Expand Down

0 comments on commit 098f90f

Please sign in to comment.