DataBiosphere / dsub

Open-source command-line tool to run batch computing tasks and workflows on backend services such as Google Cloud.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Permit all-preemptible jobs

carbocation opened this issue · comments

Per the docs:

The following will make at most 4 total attempts (one initial and 3 retries) with the first 3 attempts on a preemptible VM and the last on a full-priced VM:

dsub --preemptible 3 --retries 3 --wait ...

My goal is to run 2 attempts (one initial; one retry), both as preemptible jobs without ever defaulting to a non-preemptible job. I tried the following:

dsub --preemptible 2 --retries 1 --wait ...

However, I got the following message:

ValueError: Value passed for --preemptible cannot be larger than --retries.

As dsub is currently setup, is it possible to (1) run with at least one retry, but (2) never default to non-preemptible instances?

dsub version:

$ dsub --version
dsub version: 0.4.6

Hi @carbocation ,

There may be a possible copy-paste issue here? In the retries doc, I see:

The following will make at most 4 total attempts (one initial and 3 retries) all on preemptible VMs:

dsub --preemptible --retries 3 --wait ...

Note that there is no "3" after the preemptible flag. In this case, its treated as a boolean flag where all attempts are made using preemptible VMs. So to get what you want, I think you'll need:

dsub --preemptible --retries 1 --wait ...

Whoops, yes, problem between keyboard and chair on my end. Thanks!