跳到主要内容

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

bohr job list

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:

ParameterAbbreviationDescriptionRequired
--command-cTask Execution CommandNo
--config_file-iConfigure predefined files, and if the same fields are specified in the command line, they will be overridden.No
--image_address-mMirror address: select different mirror addresses based on the task type.Yes
--input_file_path-pInput file, for example: -p ./ indicates the current directory (default is ./)No
--job_group_id-gJob group IDNo
--job_name-nJob NameNo
--machine_type-tMachine TypeYes
--on_demand-oWhether to use preemptive mode:
  • 0: Use preemptive mode
  • 1: Use pay-as-you-go mode
  • No
    --platform-fWhich platform to submit the task toNo
    --result_path-rThe 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_idProject 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:

    ParameterAbbreviationDescriptionRequired
    --job_id-jDeleted job IDYes

    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:

    ParameterAbbreviationDescriptionRequired
    --job_id-jJob ID for early terminationYes

    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:

    ParameterAbbreviationDescriptionRequired
    --job_id-jkill job IDYes

    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:

    ParameterAbbreviationDescriptionRequired
    --job_id-jjobs idyes
    --out-oSave 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:

    ParameterAbbreviationDescriptionRequired
    --job_id-jDownloaded job IDYes

    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:

    ParameterAbbreviationDescriptionRequired
    --job_id-jJobs IDyes
    --long-lWhether to display all the task information in detailno

    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