diff --git a/vllm/distributed/utils.py b/vllm/distributed/utils.py index a3d9dbe83a12..048c05c0eca4 100644 --- a/vllm/distributed/utils.py +++ b/vllm/distributed/utils.py @@ -276,7 +276,7 @@ def barrier(self, timeout: float = 30.0): # Check for timeout cur_time = time.time() if cur_time - start_time > timeout: - raise RuntimeError("Barrier timed out after %f seconds", timeout) + raise RuntimeError(f"Barrier timed out after {timeout:.2f} seconds") # Check for each process for i in range(self.world_size): @@ -323,7 +323,9 @@ def barrier(self, timeout: float = 30.0): while len(processes_departed) < self.world_size: # Check for timeout if time.time() - start_time > timeout: - raise RuntimeError("Barrier departure timed out after %f s", timeout) + raise RuntimeError( + f"Barrier departure timed out after {timeout:.2f} seconds" + ) # Check for each process for i in range(self.world_size):