Skip to content

Commit cb87681

Browse files
authored
Fix status refresh logging (skypilot-org#1634)
Fix status logging warning
1 parent 051e34a commit cb87681

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

sky/backends/backend_utils.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,17 +1339,17 @@ def get_node_ips(cluster_yaml: str,
13391339
break
13401340
if len(worker_ips) != expected_num_nodes - 1:
13411341
n = expected_num_nodes - 1
1342-
# This could be triggered if e.g., some logging is added in
1343-
# skypilot_config, a module that has some code executed whenever
1344-
# `sky` is imported.
1345-
logger.warning(
1346-
f'Expected {n} worker IP(s); found '
1347-
f'{len(worker_ips)}: {worker_ips}'
1348-
'\nThis could happen if there is extra output from '
1349-
'`ray get-worker-ips`, which should be inspected below.'
1350-
f'\n== Output ==\n{out}'
1351-
f'\n== Output ends ==')
13521342
if len(worker_ips) > n:
1343+
# This could be triggered if e.g., some logging is added in
1344+
# skypilot_config, a module that has some code executed whenever
1345+
# `sky` is imported.
1346+
logger.warning(
1347+
f'Expected {n} worker IP(s); found '
1348+
f'{len(worker_ips)}: {worker_ips}'
1349+
'\nThis could happen if there is extra output from '
1350+
'`ray get-worker-ips`, which should be inspected below.'
1351+
f'\n== Output ==\n{out}'
1352+
f'\n== Output ends ==')
13531353
logger.warning(f'\nProceeding with the last {n} '
13541354
f'detected IP(s): {worker_ips[-n:]}.')
13551355
worker_ips = worker_ips[-n:]

0 commit comments

Comments
 (0)