Skip to main content

rerun

This command runs bx resubmit followed by bx attach.

Usage​

bx rerun [--help] <retryJobId>

Parameters, inputs and exit codes​

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

Usage example​

Rerun 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 rerun command and the job id obtained from the previous command.

$ bx rerun 1138
[batchx] [INFO] [2020/03/17 19:46:46] Retrying job 1138...
[batchx] [INFO] [2020/03/17 19:46:46] Job submitted with id 1140
[batchx] [INFO] [2020/03/17 19:46:46] Attaching to job 1140
[batchx] [INFO] [2020/03/17 19:46:47] Job status: SUBMITTED
[batchx] [INFO] [2020/03/17 19:46:55] Job status: STARTING
[batchx] [INFO] [2020/03/17 19:46:55] Job status: DOWNLOADING_INPUT
[batchx] [INFO] [2020/03/17 19:46:56] Job status: RUNNING
[batchx@tutorial/hello-world:1.0.0] [2020/03/17 19:46:59] Environment:
[batchx@tutorial/hello-world:1.0.0] [2020/03/17 19:46: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:47:09] Job status: UPLOADING_OUTPUT
[batchx] [INFO] [2020/03/17 19:47:10] Job status: SUCCEEDED
{"responseFile":"bx://jobs/1140/output/response/response.txt"}