Skip to content

Commit 33fa182

Browse files
authored
Don't query for disk usage if threshold is set to 0 for cleanup. (#3080)
1 parent c0a9e57 commit 33fa182

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/ray/cleanup_workers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ def process_cluster(config_path: str, threshold: int, dry_run: bool, parallel: i
256256
if deleted:
257257
logger.info(f"Cleaned up {len(deleted)} preempted/terminated TPUs")
258258

259+
if threshold <= 0:
260+
return True
261+
259262
tpu_names = list_cluster_workers(zone, project)
260263
if not tpu_names:
261264
logger.info("No manual workers found")

0 commit comments

Comments
 (0)