Skip to content

Commit

Permalink
fixed bug prevented disabling preemptible VMs
Browse files Browse the repository at this point in the history
  • Loading branch information
pgm committed Feb 7, 2024
1 parent 427c185 commit 55f0625
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/sparklespray/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,10 @@ def watch(
job_id: str,
cluster: Cluster,
target_nodes=None,
max_preemptable_attempts_scale=None,
initial_poll_delay=1.0,
max_poll_delay=30.0,
loglive=None,
max_preemptable_attempts_scale=2,
):
job = jq.get_job(job_id)
assert job is not None
Expand All @@ -410,12 +410,14 @@ def flush_stdout(task_id, offset):

if target_nodes is None:
target_nodes = job.target_node_count

if max_preemptable_attempts_scale is None:
max_preemptable_attempts = job.max_preemptable_attempts
else:
max_preemptable_attempts = target_nodes * max_preemptable_attempts_scale

log.info(
"targeting %s nodes. First %s nodes will be preemptive (from job: %s, %s)",
"targeting %s nodes. First %s nodes will be preemptive (from job: target_node_count=%s, max_preemptable_attempts=%s)",
target_nodes,
max_preemptable_attempts,
job.target_node_count,
Expand Down

0 comments on commit 55f0625

Please sign in to comment.