From 48309f0571c423a79e8b938cbae6223cac490aed Mon Sep 17 00:00:00 2001 From: Woosuk Kwon Date: Sun, 21 Jul 2024 10:04:22 +0000 Subject: [PATCH] [Misc] Remove abused noqa --- .../distributed/device_communicators/shm_broadcast.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vllm/distributed/device_communicators/shm_broadcast.py b/vllm/distributed/device_communicators/shm_broadcast.py index b572d7224079c..75d84c7a71bc3 100644 --- a/vllm/distributed/device_communicators/shm_broadcast.py +++ b/vllm/distributed/device_communicators/shm_broadcast.py @@ -110,7 +110,8 @@ def __init__(self, lambda *args, **kwargs: None): try: self.shared_memory = shared_memory.SharedMemory(name=name) - assert self.shared_memory.size == self.total_bytes_of_buffer # noqa + assert ( + self.shared_memory.size == self.total_bytes_of_buffer) except FileNotFoundError: # we might deserialize the object in a different node # in this case, this object is not used, @@ -344,8 +345,8 @@ def acquire_write(self): time.sleep(RINGBUFFER_SLEEP_INTERVAL) # if we wait for a long time, we should warn the user - if time.monotonic( - ) - start_time > VLLM_RINGBUFFER_WARNING_INTERVAL * n_warning: # noqa + if (time.monotonic() - start_time > + VLLM_RINGBUFFER_WARNING_INTERVAL * n_warning): logger.warning( "No available block found in %s second. ", VLLM_RINGBUFFER_WARNING_INTERVAL) @@ -398,8 +399,8 @@ def acquire_read(self): time.sleep(RINGBUFFER_SLEEP_INTERVAL) # if we wait for a long time, we should warn the user - if time.monotonic( - ) - start_time > VLLM_RINGBUFFER_WARNING_INTERVAL * n_warning: # noqa + if (time.monotonic() - start_time > + VLLM_RINGBUFFER_WARNING_INTERVAL * n_warning): logger.warning( "No available block found in %s second. ", VLLM_RINGBUFFER_WARNING_INTERVAL)