跳到主要内容

Job Commands: job

bohr job manages Bohrium compute jobs. Use the Bohr ID shown in the BOHR_ID column of bohr job list with subsequent lifecycle commands.

Commands​

CommandUsageDescription
listbohr job list [flags]List and filter jobs
submitbohr job submit [flags]Submit a job
describebohr job describe [flags]Describe jobs or a job group
logbohr job log <bohr_id>... [flags]Download log files
downloadbohr job download <bohr_id>... [flags]Download result files
terminatebohr job terminate <bohr_id>... [flags]Gracefully terminate jobs
killbohr job kill <bohr_id>... [flags]Force-stop jobs
deletebohr job delete <bohr_id>... [flags]Delete jobs

Agent-friendly shortcuts are also available: +submit, +watch, and +cancel.

List jobs​

bohr job list -n 20
bohr job list --running -o json
bohr job list -j 1022 --fail

Important filters include -j, --job_group_id, -n, --number, --pending, -r, --running, -i, --finish, -f, --fail, -s, --scheduling, -t, --stopping, and -d, --stopped.

Use the global output flag to select a structured format:

bohr job list --output yaml

Submit a job​

Submit from a JSON configuration file:

bohr job submit -i job.json --input_directory ./input

Or provide fields directly:

bohr job submit \
--project_id 123 \
--machine_type c2_m4_cpu \
--image_address registry.dp.tech/dptech/ubuntu:22.04 \
--command "python main.py" \
--input_directory ./input

Key flags:

FlagDescription
-i, --config_fileJSON configuration file
--input_directoryLocal input directory; there is no -p shorthand
--project_idBohrium project ID
-m, --image_addressImage address
-t, --machine_typeMachine type; inspect with bohr machine list -c all
-c, --commandCommand executed in the job
-g, --job_group_idGroup created by bohr job_group create
-r, --result_pathBohrium remote path under /personal or /share, not a local path
--max_run_timeMaximum runtime in minutes
--nnodeNumber of compute nodes, default 1

Submitting a job can create billable resources. The CLI asks for confirmation; use --dry-run to validate without submitting.

Inspect and download​

bohr job describe -i 20143720 -o json
bohr job log 20143720 --out ./logs
bohr job download 20143720 --out ./results

log and download use --out for the local destination. -o is reserved for the global output format.

Stop or delete jobs​

bohr job terminate 20143720
bohr job kill 20143720
bohr job delete 20143720

kill and delete are destructive operations and require confirmation. Preview either command with --dry-run first when scripting.