更新时间:2024-04-30 GMT+08:00

查询ModelArts训练作业

使用ma-cli ma-job get-job命令可以查看训练作业列表或某个作业详情。

$ ma-cli ma-job get-job -h
Usage: ma-cli ma-job get-job [OPTIONS]

  Get job details.

  Example:

  # Get train job details by job name
  ma-cli ma-job get-job -n ${job_name}

  # Get train job details by job id
  ma-cli ma-job get-job -i ${job_id}

  # Get train job list
  ma-cli ma-job get-job --page-size 5 --page-num 1

Options:
  
  -i, --job-id TEXT               Get training job details by job id.
  -n, --job-name TEXT             Get training job details by job name.
  -pn, --page-num INTEGER         Specify which page to query.  [x>=1]
  -ps, --page-size INTEGER RANGE  The maximum number of results for this query.  [1<=x<=50]
  -v, --verbose                   Show detailed information about training job details.
  -C, --config-file TEXT          Configure file path for authorization.
  -D, --debug                     Debug Mode. Shows full stack trace when error occurs.
  -P, --profile TEXT              CLI connection profile to use. The default profile is "DEFAULT".
  -h, -H, --help                  Show this message and exit.
表1 参数说明

参数名

参数类型

是否必选

参数说明

-i / --job-id

String

查询指定训练任务ID的任务详情。

-n / --job-name

String

查询指定任务名称的训练任务或根据任务名称关键字过滤训练任务。

-pn / --page-num

Int

页面索引,默认是第1页。

-ps / --page-size

Int

每页显示的训练作业数量,默认是10。

-v / --verbose

Bool

显示详细的信息开关,默认关闭。

示例

  • 查询指定任务ID的训练任务。
    ma-cli ma-job get-job -i b63e90xxx

  • 根据任务名称关键字“auto”过滤训练任务。
    ma-cli ma-job get-job -n auto