AI开发平台MODELARTS-查询Workflow:响应示例

时间:2024-04-30 18:34:11

响应示例

状态码: 200

OK

{
  "created_at" : "2022-09-09T11:28:29.639658+08:00",
  "workflow_id" : "6b596c75-fe1f-440b-be83-fe5e240133c4",
  "name" : "graph-test-has-condition-step",
  "description" : "",
  "user_name" : "zuoping",
  "workspace_id" : "0",
  "steps" : [ {
    "created_at" : "2022-09-09T11:28:29.6438+08:00",
    "name" : "condition_step_test",
    "title" : "condition_step_test",
    "description" : "",
    "type" : "condition",
    "conditions" : [ {
      "type" : "==",
      "left" : "$ref/parameters/is_true",
      "right" : true
    } ],
    "if_then_steps" : [ "training_job1" ],
    "else_then_steps" : [ "training_job2" ],
    "policy" : { }
  }, {
    "created_at" : "2022-09-09T11:28:29.646244+08:00",
    "name" : "training_job1",
    "title" : "labeling",
    "description" : "",
    "type" : "job",
    "inputs" : [ {
      "name" : "data_url",
      "type" : "obs",
      "data" : "$ref/data/a2ff296da618452daa8243399f06db8e"
    } ],
    "outputs" : [ {
      "name" : "train_url",
      "type" : "obs",
      "config" : {
        "obs_url" : "/test-lh/test-metrics/"
      }
    }, {
      "name" : "service-link",
      "type" : "service_content",
      "config" : {
        "config_file" : "$ref/parameters/service_config1"
      }
    } ],
    "properties" : {
      "algorithm" : {
        "id" : "21ef85a8-5e40-4618-95ee-aa48ec224b43",
        "parameters" : [ ]
      },
      "kind" : "job",
      "metadata" : {
        "name" : "workflow-b0b9fa4c06254b2ebb0e48ba1f7a916c"
      },
      "spec" : {
        "resource" : {
          "flavor_id" : "$ref/parameters/train_spec",
          "node_count" : 1,
          "policy" : "regular"
        }
      }
    },
    "depend_steps" : [ "condition_step_test" ],
    "policy" : { }
  }, {
    "created_at" : "2022-09-09T11:28:29.648868+08:00",
    "name" : "training_job2",
    "title" : "labeling",
    "description" : "",
    "type" : "job",
    "inputs" : [ {
      "name" : "data_url",
      "type" : "obs",
      "data" : "$ref/data/f78e46676a454ccdacb9907f589f8d67"
    } ],
    "outputs" : [ {
      "name" : "train_url",
      "type" : "obs",
      "config" : {
        "obs_url" : "/test-lh/test-metrics/"
      }
    }, {
      "name" : "service-link",
      "type" : "service_content",
      "config" : {
        "config_file" : "$ref/parameters/service_config2"
      }
    } ],
    "properties" : {
      "algorithm" : {
        "id" : "21ef85a8-5e40-4618-95ee-aa48ec224b43",
        "parameters" : [ ]
      },
      "kind" : "job",
      "metadata" : {
        "name" : "workflow-4a4317eb49ad4370bd087e6b726d84cf"
      },
      "spec" : {
        "resource" : {
          "flavor_id" : "$ref/parameters/train_spec",
          "node_count" : 1,
          "policy" : "regular"
        }
      }
    },
    "depend_steps" : [ "condition_step_test" ],
    "policy" : { }
  }, {
    "created_at" : "2022-09-09T11:28:29.649982+08:00",
    "name" : "training_job3",
    "title" : "labeling",
    "description" : "",
    "type" : "job",
    "inputs" : [ {
      "name" : "data_url",
      "type" : "obs",
      "data" : "$ref/data/dee65054c96b4bf3b7ac98c0709f9ae0"
    } ],
    "outputs" : [ {
      "name" : "train_url",
      "type" : "obs",
      "config" : {
        "obs_url" : "/test-lh/test-metrics/"
      }
    }, {
      "name" : "service-link",
      "type" : "service_content",
      "config" : {
        "config_file" : "$ref/parameters/service_config3"
      }
    } ],
    "properties" : {
      "algorithm" : {
        "id" : "21ef85a8-5e40-4618-95ee-aa48ec224b43",
        "parameters" : [ ]
      },
      "kind" : "job",
      "metadata" : {
        "name" : "workflow-3039303b3ae14f3e9eed416ba6361b1f"
      },
      "spec" : {
        "resource" : {
          "flavor_id" : "$ref/parameters/train_spec",
          "node_count" : 1,
          "policy" : "regular"
        }
      }
    },
    "depend_steps" : [ "training_job1", "training_job2" ],
    "policy" : { }
  } ],
  "labels" : [ "subgraph" ],
  "data" : [ {
    "name" : "a2ff296da618452daa8243399f06db8e",
    "type" : "obs",
    "value" : {
      "obs_url" : "/test-lh/test-metrics/"
    },
    "used_steps" : [ "training_job1" ]
  }, {
    "name" : "f78e46676a454ccdacb9907f589f8d67",
    "type" : "obs",
    "value" : {
      "obs_url" : "/test-lh/test-metrics/"
    },
    "used_steps" : [ "training_job2" ]
  }, {
    "name" : "dee65054c96b4bf3b7ac98c0709f9ae0",
    "type" : "obs",
    "value" : {
      "obs_url" : "/test-lh/test-metrics/"
    },
    "used_steps" : [ "training_job3" ]
  } ],
  "parameters" : [ {
    "name" : "is_true",
    "type" : "bool",
    "delay" : true,
    "value" : true,
    "used_steps" : [ "condition_step_test" ]
  }, {
    "name" : "train_spec",
    "type" : "str",
    "format" : "flavor",
    "description" : "training specification",
    "default" : "modelarts.vm.cpu.8u",
    "used_steps" : [ "training_job1", "training_job2", "training_job3" ]
  }, {
    "name" : "service_config1",
    "type" : "str",
    "default" : "/test-lh/test-metrics/metrics.json",
    "used_steps" : [ "training_job1" ]
  }, {
    "name" : "service_config2",
    "type" : "str",
    "default" : "/test-lh/test-metrics/metrics.json",
    "used_steps" : [ "training_job2" ]
  }, {
    "name" : "service_config3",
    "type" : "str",
    "default" : "/test-lh/test-metrics/metrics.json",
    "used_steps" : [ "training_job3" ]
  } ],
  "sub_graphs" : [ {
    "name" : "stage_A",
    "steps" : [ "training_job1", "training_job2" ]
  } ],
  "policy" : { },
  "last_modified_at" : "2022-10-28T16:49:13.056726+08:00",
  "source_workflow_id" : "05427e9d-42ac-4816-bd45-360c1bfd780b",
  "latest_execution" : {
    "execution_id" : "43e317e2-34b0-4348-9c1b-08d3083512e1",
    "created_at" : "2022-10-28T16:49:03.894771+08:00",
    "status" : "completed",
    "duration" : 209
  },
  "run_count" : 2,
  "param_ready" : true
}
support.huaweicloud.com/api-modelarts/ShowWorkflow.html