Skip to main content

resubmit

This command submits a job given a previous job definition, keeping the image coordinates and the input message.

Usage​

bx resubmit [--help] <retryJobId>

Parameters and inputs​

ShorthandLong versionDescription
-v--vcpus=<vcpus>Number of virtual CPUs
-m--memory=<memory>RSS memory size (in MB) available for the container
-g--gpus=<gpus>Number of GPUs
-t--timeout=<timeout>Maximum allowed time (seconds) for the job
--helpShow this help message and exit

Examples​

Resubmit a job​

First run a job using the hello-world image.

$ bx run tutorial/hello-world:1.0.0 '{"yourName":"Michael Jordan"}'
[batchx] [INFO] [2020/03/17 19:41:56] Submitting job...
[batchx] [INFO] [2020/03/17 19:41:57] Job submitted with id 1138
[batchx] [INFO] [2020/03/17 19:41:57] Attaching to job 1138
[batchx] [INFO] [2020/03/17 19:41:57] Job status: SUBMITTED
[batchx] [INFO] [2020/03/17 19:42:52] Job status: STARTING
[batchx] [INFO] [2020/03/17 19:42:52] Job status: DOWNLOADING_INPUT
[batchx] [INFO] [2020/03/17 19:42:53] Job status: RUNNING
[batchx@tutorial/hello-world:1.0.0] [2020/03/17 19:42:59] Environment:
[batchx@tutorial/hello-world:1.0.0] [2020/03/17 19:42:59] environ({'HOSTNAME': 'batchx-container', 'PYTHON_PIP_VERSION': '19.1.1', 'SHLVL': '1', 'HOME': '/root', 'GPG_KEY': '0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'BX_MEMORY': '1000', 'LANG': 'C.UTF-8', 'BX_GPUS': '0', 'PYTHON_VERSION': '3.6.8', 'BX_VCPUS': '1', 'PWD': '/batchx'})
[batchx] [INFO] [2020/03/17 19:43:13] Job status: UPLOADING_OUTPUT
[batchx] [INFO] [2020/03/17 19:43:15] Job status: SUCCEEDED
{"responseFile":"bx://jobs/1138/output/response/response.txt"}

Repeat this execution using the bx resubmit command and the job id of the previous execution.

$ bx resubmit 1138
[batchx] [INFO] [2020/03/17 19:44:12] Retrying job 1138...
[batchx] [INFO] [2020/03/17 19:44:12] Job submitted with id 1139