更新时间:2023-05-24 GMT+08:00
分享

通过调用API查询作业详情

功能介绍

该接口用于查询作业详情。

URI

GET/v1/{project_id}/jobs/{job_id}

参数说明请参见表1

表1 URI参数说明

名称

是否必选

类型

说明

project_id

String

项目编号,用于资源隔离。获取方法请参见获取项目ID

job_id

String

作业ID。

请求消息

暂不涉及。

响应消息

响应参数请参见表2

表2 响应参数说明

参数名称

是否必选

参数类型

说明

is_success

Boolean

是否成功。

job

Object

请参见表3,返回的作业信息。

表3 job参数说明

参数名称

是否必选

参数类型

说明

job_id

String

训练作业ID。

job_name

String

训练作业名称,只能由数字,字母,下划线,中划线组成,最大长度为20字符

job_description

String

训练作业描述,最大长度为256字符

project_id

String

项目编号,用于资源隔离。

user_id

String

用户ID。

operating_time

Long

操作时间。

request_info

Object

请求体。

response_info

Object

返回体。

job_status

String

作业状态。

resource

String

资源,现在支持DLI。

is_use

int

是否被使用:

  • 1,被使用。
  • 0,没有被使用。

type

String

训练作业类型。

示例

  • 成功响应示例
    {
    "is_success": true,
    "job": {
    "job_id": "d7a72d46599e4d32bc79efaf8041b6e5",
    "job_name": "Recall-hotrec-0218-2",
    "project_id": "b09d59c4e8724078a5e8efa65049e78f",
    "user_id": "03cfcb78b4b34ba79c9d5aa43dcfb49a",
    "operating_time": 1550496579694,
    "request_info": {
    "job_name": "Recall-hotrec-0218-2",
    "job_description": "Recall-hotrec",
    "offline_platform": {
    "platform": "DLI",
    "platform_parameter": {
    "cluster_name": "res_two"
    },
    "config_load_path": "<配置源路径>",
    "computing_resource": ""
    },
    "storage": {
    "platform": "CloudTable",
    "platform_parameter": {
    "cluster_id": "4c017a11-4657-4192-95d4-31481842470c",
    "cluster_name": "cloudtable-49b6-res",
    "table_name": "hotrec-0218-2"
    }
    },
    "strategy": {
    "name": "基于特定行为热度推荐",
    "strategy_type": "recall",
    "algorithm_type": "SpecificBehavior",
    "parameter": {
    "data_source_config": {
    "retain_days": 30,
    "behavior_type": "consume",
    "start_time": 1483200000000,
    "end_time": 1548950400000
    },
    "algorithm_config": {},
    "candidate_set_config": {
    "is_recommended_by_category": false
    }
    },
    "candidate_set": [
    {
    "uuid": "8ad7f7eafc094a6a8a650bf232f9627b",
    "description": "基于特定行为热度推荐"
    }
    ],
    "output_data": [
    {
    "recType": "DIREC",
    "id": "do_hot_rec_offline_candidates",
    "name": "HOT_REC_OFFLINE_CANDIDATES",
    "dataType": "CANDIDATES_SET",
    "description": "特定行为热度推荐算法生成的候选集"
    }
    ],
    "input_data": [
    {
    "dataType": "USER_BEHAVIOR",
    "description": "用户操作行为表",
    "required": true,
    "preconditions": []
    },
    {
    "dataType": "ITEM_META_CONF",
    "description": "物品属性配置表",
    "required": true,
    "preconditions": []
    },
    {
    "dataType": "ITEM_META",
    "description": "物品属性表\t",
    "required": true,
    "preconditions": [
    {
    "key": "按类别推荐",
    "type": "boolean",
    "enumList": [],
    "min": 0,
    "max": 0,
    "flag": true
    }
    ]
    }
    ],
    "data_source": [
    {
    "table_type_id": "ITEM_META",
    "data_format": "csv",
    "data_source_url": "<数据源存储路径>",
    "data_param": {
    "header": "false",
    "delimiter": ",",
    "quote": "\"",
    "escape": "\\"
    }
    },
    {
    "table_type_id": "ITEM_META_CONF",
    "data_format": "csv",
    "data_source_url": "<数据源存储路径>",
    "data_param": {
    "header": "false",
    "delimiter": ",",
    "quote": "\"",
    "escape": "\\"
    }
    },
    {
    "table_type_id": "USER_BEHAVIOR",
    "data_format": "csv",
    "data_source_url": "<数据源存储路径>",
    "data_param": {
    "header": "false",
    "delimiter": ",",
    "quote": "\"",
    "escape": "\\"
    }
    }
    ],
    "strategy_id": 0
    }
    },
    "response_info": {
    "is_success": true,
    "job_id": "d7a72d46599e4d32bc79efaf8041b6e5",
    "strategy": {
    "candidate_set": [
    {
    "uuid": "8ad7f7eafc094a6a8a650bf232f9627b",
    "description": "基于特定行为热度推荐"
    }
    ],
    "strategy_id": -1
    }
    },
    "job_description": "Recall-hotrec",
    "job_status": "SUCCEEDED",
    "resource": "DLI",
    "is_use": 0,
    "type": "recall"
    }
    }
  • 失败响应示例
    {
    "is_success": false,
    "error_code": "res.2211",
    "error_msg": "Failed to query."
    }

状态码

状态码请参见状态码

相关文档