"...git@developer.sourcefind.cn:2222/OpenDAS/vllm_cscc.git" did not exist on "fc6485d27750076642e99a1ef2df0e6375958bb4"
Unverified Commit 88966f02 authored by MatejKosec's avatar MatejKosec Committed by GitHub
Browse files

fix(nixl): fix iteration_count debug logging in _wait_for_completion_ (#7966)


Signed-off-by: default avatarMatej Kosec <mkosec@nvidia.com>
parent 5841deda
...@@ -21,6 +21,7 @@ import ctypes ...@@ -21,6 +21,7 @@ import ctypes
import logging import logging
import socket import socket
import threading import threading
import time
import uuid import uuid
import zlib import zlib
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
...@@ -447,12 +448,15 @@ class ActiveOperation(AbstractOperation): ...@@ -447,12 +448,15 @@ class ActiveOperation(AbstractOperation):
) -> None: ) -> None:
# Loop until the operation is no longer in progress (or "initialized"), # Loop until the operation is no longer in progress (or "initialized"),
# yielding control to the event loop to allow other operations to run. # yielding control to the event loop to allow other operations to run.
iteration_count = 0 start = time.monotonic()
next_log_time = start
sleep_time = min_poll_ms sleep_time = min_poll_ms
while True: while True:
if iteration_count & 10 == 0: now = time.monotonic()
if now >= next_log_time:
next_log_time = now + 10.0
logger.debug( logger.debug(
f"dynamo.nixl_connect.{self.__class__.__name__}: Waiting for operation {{ kind={self._operation_kind}, remote='{self._remote.name}', duration={iteration_count / 10}s }}." f"dynamo.nixl_connect.{self.__class__.__name__}: Waiting for operation {{ kind={self._operation_kind}, remote='{self._remote.name}', duration={now - start:.1f}s }}."
) )
match self.status: match self.status:
# "in progress" or "initialized" means the operation is ongoing. # "in progress" or "initialized" means the operation is ongoing.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment