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 098f90f commit 47e0252
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vllm/worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ def __init__(
self.profiler = None

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

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

def _is_encoder_decoder_model(self):
Expand Down

0 comments on commit 47e0252

Please sign in to comment.