更新时间:2024-06-20 GMT+08:00
分享

查询Execution

功能介绍

通过ID查询Execution详情。

接口约束

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v2/{project_id}/workflows/{workflow_id}/executions/{execution_id}

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

用户项目ID。获取方法请参见获取项目ID和名称

workflow_id

String

工作流的ID。

execution_id

String

工作流执行ID。

请求参数

响应参数

状态码: 200

表2 响应Body参数

参数

参数类型

描述

created_at

String

创建时间。

name

String

执行记录名称。

execution_id

String

工作流执行ID。工作流创建时后台自动生成。

description

String

执行记录描述。

status

String

执行记录状态。

workspace_id

String

工作空间ID。

workflow_id

String

工作流ID。

workflow_name

String

工作流名称。填写1-64位,仅包含英文、数字、下划线(_)和中划线(-),并且以英文开头的名称。

scene_id

String

场景ID。

scene_name

String

场景名称。

steps_execution

Array of StepExecution objects

执行记录的step。

sub_graphs

Array of WorkflowSubgraph objects

子图。

duration

String

时长。

events

Array of strings

事件。

labels

Array of strings

执行记录打上的标签。

data_requirements

Array of DataRequirement objects

节点steps使用到的数据。

parameters

Array of WorkflowParameter objects

节点steps使用到的参数。

policies

WorkflowDagPolicies object

执行记录使用到的执行策略。

表3 StepExecution

参数

参数类型

描述

step_name

String

节点的名称,在一个DAG中唯一,1到64位只包含中英文,数字,空格,下划线(_)和中划线(-),并且以中英文开头。

uuid

String

唯一标识uuid。创建节点执行时,后台自动生成。

created_at

String

创建时间。

duration

Integer

运行时长。

type

String

节点的类型。

instance_id

String

实例ID。

status

String

节点的状态。枚举值如下:

  • init:初始化

  • wait_inputs:等待输入

  • pending:等待

  • creating:创建中

  • created:创建成功

  • create_failed:创建失败

  • running:运行中

  • stopping:停止中

  • stopped:停止

  • timeout:超时

  • completed:完成

  • failed:失败

  • hold:持有

  • skipped:跳过

inputs

Array of JobInput objects

节点的输入项。

outputs

Array of JobOutput objects

节点的输出项。

step_uuid

String

节点的UUID,唯一性标识。

properties

Map<String,Object>

节点的属性。

events

Array of strings

节点发生的事件。

error_info

WorkflowErrorInfo object

错误信息。

policy

WorkflowStepExecutionPolicy object

节点的执行策略。

conditions_execution

WorkflowConditionExecution object

条件执行。

step_title

String

节点标题。

conditions

Array of StepCondition objects

条件节点执行条件。

表4 JobInput

参数

参数类型

描述

name

String

输入项名称,支持1到64位只包含英文、数字、下划线(_)和中划线(-)的字符。

type

String

输入项类型。枚举值如下:

  • dataset:数据集

  • obs:OBS

  • data_selector:数据选择

data

Object

输入项数据。

value

Object

输入项的值。

表5 JobOutput

参数

参数类型

描述

name

String

输出项名称。

type

String

输出项类型。枚举值如下:

  • obs:OBS

  • model:AI应用元模型

config

Map<String,Object>

输出配置。

表6 WorkflowErrorInfo

参数

参数类型

描述

error_code

String

错误码。

error_message

String

错误信息。

表7 WorkflowStepExecutionPolicy

参数

参数类型

描述

execution_policy

String

执行策略,可选值如下:

  • retry:重试

  • stop,:停止

  • continue:继续运行

use_cache

Boolean

使用的缓存。

表8 WorkflowConditionExecution

参数

参数类型

描述

result

String

执行结果。

metric_list

Array of WorkflowMetricPair objects

工作流度量信息列表。

表9 WorkflowMetricPair

参数

参数类型

描述

key

String

度量信息metric的key。

value

Object

度量信息metric的值。

表10 StepCondition

参数

参数类型

描述

type

String

判断类型,例如==(等于)、!=(不等于)、>(大于)、>=(大于等于)、<(小于)、<=(小于等于)、in(包含)、or(或)。

left

Object

取true时的分支。

right

Object

取false时的分支。

表11 WorkflowSubgraph

参数

参数类型

描述

name

String

子图名称。

steps

Array of strings

子图step成员。

表12 DataRequirement

参数

参数类型

描述

name

String

数据的名称。填写1-64位,仅包含英文、数字、下划线(_)和中划线(-),并且以英文开头的名称。

type

String

类型。枚举值如下:

  • dataset:数据集

  • obs:OBS

  • swr:SWR

  • model_list:AI应用列表

  • label_task:标注任务

  • service:在线服务

conditions

Array of Constraint objects

数据约束条件。

value

Map<String,Object>

数据的值。

used_steps

Array of strings

使用了这条数据的工作流节点。

delay

Boolean

延时参数标记。

表13 Constraint

参数

参数类型

描述

attribute

String

属性,参数的某个字段值。

operator

String

操作,当前只支持equal操作。

value

Object

取值。

表14 WorkflowParameter

参数

参数类型

描述

name

String

配置参数的名称。填写1-64位,仅包含英文、数字、下划线(_)和中划线(-),并且以英文开头的名称。

type

String

参数的类型,枚举值如下:

  • str:字符串

  • int:整型

  • bool:布尔类型

  • float:浮点型

description

String

描述。

example

Object

样例。

delay

Boolean

是否为延迟输入的参数。

default

Object

默认值。

value

Object

Parameter的值。

enum

Array of objects

枚举项。

used_steps

Array of strings

使用这个参数的工作流节点。

format

String

数据格式。

constraint

Map<String,Object>

限制条件。

表15 WorkflowDagPolicies

参数

参数类型

描述

use_cache

Boolean

使用缓存。

请求示例

查询Execution详情

GET https://{endpoint}/v2/{project_id}/workflows/{workflow_id}/executions/fa412c98-6d94-42a2-891a-99cd1da93916

响应示例

状态码: 200

Execution Information

{
  "created_at" : "2022-06-16T23:12:48.458022+08:00",
  "name" : "execution-056",
  "execution_id" : "fa412c98-6d94-42a2-891a-99cd1da93916",
  "description" : "",
  "status" : "stopped",
  "workspace_id" : "0",
  "workflow_id" : "f1642618-43eb-4ab1-a0b1-9cc584182c60",
  "workflow_name" : "workflow_model_service_no_modify_xiahou_copy",
  "steps_execution" : [ {
    "created_at" : "2022-06-16T23:12:48.466906+08:00",
    "uuid" : "5e8456bd-35ff-4cc9-9624-935c37dabe47",
    "instance_id" : "{\"model_id\":\"7d795a48-e646-43b0-b4cb-759454acaf2b\"}",
    "step_name" : "model_step",
    "step_title" : "model release",
    "status" : "completed",
    "duration" : 17,
    "inputs" : [ {
      "name" : "model_input",
      "type" : "obs",
      "data" : "$ref/data_requirements/model_input",
      "value" : {
        "object_type" : [ "DIRECTORY" ],
        "obs_url" : "/test-crq/train_output/"
      }
    } ],
    "outputs" : [ {
      "name" : "model_output",
      "type" : "model",
      "config" : {
        "model_id" : "7d795a48-e646-43b0-b4cb-759454acaf2b"
      }
    } ],
    "properties" : {
      "model_name" : "lh-xh",
      "model_type" : "TensorFlow"
    },
    "events" : [ "2022-06-16 23:12:49 change status from init to creating", "2022-06-16 23:12:51 change status from creating to created", "2022-06-16 23:12:51 change status from created to running", "2022-06-16 23:13:05 change status from running to completed" ],
    "policy" : { }
  }, {
    "created_at" : "2022-06-16T23:13:05.620354+08:00",
    "uuid" : "9b452016-cc7b-4bfe-snt9-f9d53dcb4cc1",
    "step_name" : "service_step",
    "step_title" : "service install",
    "status" : "stopped",
    "duration" : 1,
    "events" : [ "2022-06-16 23:13:06 change status from init to wait_inputs", "2022-06-16 23:16:13 change status from wait_inputs to stopped" ],
    "policy" : { }
  } ],
  "duration" : 204,
  "events" : [ "2022-06-16 23:12:49 step model_step change status from init to creating", "2022-06-16 23:12:51 step model_step change status from creating to created", "2022-06-16 23:12:51 step model_step change status from created to running", "2022-06-16 23:13:05 step model_step change status from running to completed", "2022-06-16 23:13:06 step service_step change status from init to wait_inputs", "2022-06-16 23:16:13 step service_step change status from wait_inputs to stopped" ],
  "data_requirements" : [ {
    "name" : "model_input",
    "type" : "obs",
    "conditions" : [ {
      "attribute" : "object_type",
      "operator" : "equal",
      "value" : "directory"
    } ],
    "value" : {
      "object_type" : [ "DIRECTORY" ],
      "obs_url" : "/test-crq/train_output/"
    },
    "used_steps" : [ "model_step" ]
  }, {
    "name" : "service_model",
    "type" : "model_list",
    "delay" : true,
    "conditions" : [ {
      "attribute" : "model_name",
      "operator" : "equal",
      "value" : "lh-xh"
    } ],
    "used_steps" : [ "service_step" ]
  } ],
  "parameters" : [ {
    "name" : "schedule_d5sm",
    "type" : "int",
    "format" : "schedule",
    "description" : "Set how long the deployed service will stop in hours, where -1 means the service will always run",
    "delay" : true,
    "used_steps" : [ "service_step" ]
  } ],
  "policies" : { }
}

状态码

状态码

描述

200

Execution Information

错误码

请参见错误码

分享:

    相关文档

    相关产品