Job Management Commands:job
Query:list
Entry:
bohr job list
Summary:
Usage:
bohr job list [flags]
Aliases:
list, -ls
Flags:
--csv Output in CSV format
-h, --help help for list
--json Output in JSON format
--yaml Output in YAML format
Example:
bohr job list
# View the most recent 10 job postings(Press Ctrl+C to exit).
bohr job list --csv
#Output the most recent 10 job in JSON format
Submit:submit
Entry:
bohr job submit
Summary:
Usage:
bohr job submit [flags]
Examples:
$ bohr job submit
Flags:
-c, --command string command
-i, --config_file string config file
-h, --help help for submit
-m, --image_address string image name
-p, --input_file_path string input directory path (default "./")
-g, --job_group_id int job group id
-n, --job_name string job name
-t, --machine_type string machine type
-o, --ondemand ondemand
-f, --platform string platform
--project_id int project id
-r, --result_path string result path
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--command | -c | Task Execution Command | No |
--config_file | -i | Configure predefined files, and if the same fields are specified in the command line, they will be overridden. | No |
--image_address | -m | Mirror address: select different mirror addresses based on the task type. | Yes |
--input_file_path | -p | Input file, for example: -p ./ indicates the current directory (default is ./) | No |
--job_group_id | -g | Job group ID | No |
--job_name | -n | Job Name | No |
--machine_type | -t | Machine Type | Yes |
--on_demand | -o | Whether to use preemptive mode: | No |
--platform | -f | Which platform to submit the task to | No |
--result_path | -r | The result files are automatically downloaded to the specified directory. Note: Data can be automatically downloaded to the personal drive or the share drive. Specify the path after the -r parameter, starting with /share or /personal . | No |
--project_id | Project ID: This is the ID of the project you created, which can be viewed in project management. | Yes |
注意
The job_group_id
used here is different from the JobGroupId
obtained after creating a task. The job_group_id
needs to be created through bohr job_group create to meet the requirement of submitting multiple tasks into the same job group.
Example:
bohr job submit -i job.json -p ./input
# Use the files in job.json and treat the files in the input directory as input.
--config_file -i JSON file example
{
"job_name": "DeePMD-kit test",
"command": " cd se_e2_a && dp train input.json > tmp_log 2>&1 && dp freeze -o graph.pb",
"log_file": "se_e2_a/tmp_log",
"backward_files": ["se_e2_a/lcurve.out","se_e2_a/graph.pb"],
"project_id": 0000,
"machine_type": "c4_m15_1 * NVIDIA T4",
"job_type": "container",
"image_address": "registry.dp.tech/dptech/deepmd-kit:2.1.5-cuda11.6"
}
Delete:delete
Entry:
bohr job delete
Summary:
Usage:
bohr job delete [flags]
Flags:
-h, --help help for delete
-j, --job_id int job id
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | -j | Deleted job ID | Yes |
Example:
$ bohr job delete -j 1235
# Delete the task with ID 1235
Terminate early:terminate
Entry:
bohr job terminate
Summary:
Usage:
bohrctl job terminate [flags]
Flags:
-h, --help help for terminate
-j, --job_id int job id
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | -j | Job ID for early termination | Yes |
Example:
$ bohr job terminate -j 1235
# Terminate the task with ID 1235 early
Kill:kill
Entry:
bohr job kill
Summary:
Usage:
bohr job kill [flags]
Flags:
-h, --help help for kill
-j, --job_id int job id
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | -j | kill job ID | Yes |
Example:
$ bohr job kill -j 1235
# Kill the task with ID 1235
Download log:log
Entry:
bohr job log
Summary:
Usage:
bohr job log [flags]
Flags:
-h, --help help for log
-j, --job_id ints id of the job
-o, --out string save file location (default "./")
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | -j | jobs id | yes |
--out | -o | Save the logs to a local path for example: -o ./ indicates the current directory (default is ./) | No |
案例:
$ bohr job log -j 1235 -j 2345 -o /personal
# Download the log files for Job IDs 1235 and 2345 and save them to the local /personal directory
Download:download
Entry:
bohr job download
Summary:
Usage:
bohr job download [flags]
Aliases:
download, -d
Flags:
-h, --help help for download
-j, --job_id string job_id for downloaded file
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | -j | Downloaded job ID | Yes |
Example:
$ bohr job download -j 1235
# Download the files of Job ID 1235
Describe:describe
Entry:
bohr job describe
Summary:
Usage:
bohr job describe [flags]
Flags:
--csv output with csv format
-h, --help help for describe
-j, --job_id ints Job ID(s)
--json output with json format
-l, --long Long listing format
--noheader does not print header information
--table output with table format
--yaml output with yaml format
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | -j | Jobs ID | yes |
--long | -l | Whether to display all the task information in detail | no |
Example:
$ bohr job describe -j 1235 -j 2345 --json
# Display the task details of Job IDs 1235 and 2345 in JSON format
$ bohr job describe -j 1235 -l
# View the task with Job ID 1235 and display all its information in detail