Skip to content

Commit db8e29a

Browse files
committed
fix
Signed-off-by: oliver könig <[email protected]>
1 parent 5fe32a4 commit db8e29a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

nemo_run/core/execution/dgxcloud.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,12 @@ def status(self, job_id: str) -> Optional[DGXCloudState]:
347347
r_json = response.json()
348348
return DGXCloudState(r_json["phase"])
349349

350-
def _stream_url_sync(self, url: str, queue: queue.Queue):
350+
def _stream_url_sync(self, url: str, q: queue.Queue):
351351
"""Stream a single URL using requests and put chunks into the queue"""
352352
try:
353353
with requests.get(url, stream=True, verify=False) as response:
354354
for line in response.iter_lines():
355-
queue.put(line)
355+
q.put(line)
356356
except Exception as e:
357357
logger.error(f"Error streaming URL {url}: {e}")
358358

@@ -400,9 +400,7 @@ def fetch_logs(
400400
active_urls = set(urls)
401401

402402
# Start threads
403-
threads = [
404-
threading.Thread(target=self._stream_url_sync, args=(url, queue)) for url in urls
405-
]
403+
threads = [threading.Thread(target=self._stream_url_sync, args=(url, q)) for url in urls]
406404
for t in threads:
407405
t.start()
408406

0 commit comments

Comments
 (0)