华为云用户手册

  • 响应示例 状态码: 200 修改工作空间配额成功的响应参数。 { "quotas" : [ { "max_quota" : 60000, "update_time" : 1574339372000, "resource" : "exemlProject.gpu_duration", "quota" : 20, "min_quota" : -1, "name_cn" : "自动学习(图像分类、物体检测、声音分类)训练时长", "unit_cn" : "分钟", "name_en" : "ExeML training duration (image classification, object detection, and sound classification)", "unit_en" : "minute" } ] }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 quotas 是 Array of quotas objects 工作空间配额数据。 表4 quotas 参数 是否必选 参数类型 描述 resource 是 String 资源标识。 quota 是 Integer 要修改的配额值。配额值为正整数或-1,-1代表不限制配额。配额值范围不能超过配额的最大值与最小值。可通过调用查询工作空间配额接口查询配额的最大值。
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 quotas Array of WorkspaceQuotasUpdateResponse objects 工作空间配额数据。 表6 WorkspaceQuotasUpdateResponse 参数 参数类型 描述 max_quota Integer 配额允许设置的最大值。 update_time Integer 最后修改时间,UTC。如用户未修改过该资源配额,则该值默认为该工作空间的创建时间。 resource String 资源的唯一标识。 quota Integer 当前配额值。配额值为-1代表不限制配额。 min_quota Integer 配额允许设置的最小值。 name_cn String 配额名称(中文)。 unit_cn String 数量单位(中文)。 name_en String 工作空间ID,系统生成的32位UUID,不带橫线。默认的工作空间id为'0'。 unit_en String 数量单位(英文)。
  • 请求示例 DELETE https://endpoint/v2/{project_id }/modelarts-trainJob/{training_job_id}/tags/delete { "tags" : [ { "key" : "111", "value" : "v2" }, { "key" : "k3", "value" : "v2" } ] }
  • 响应示例 状态码: 200 查询工作空间列表成功的响应参数。 { "total_count" : 10, "count" : 1, "workspaces" : [ { "id" : 0, "name" : "default", "description" : "", "owner" : "testUser", "enterprise_project_id" : "***b0091-887f-4839-9929-cbc884f1e***", "enterprise_project_name" : "default", "auth_type" : "public", "create_time" : 1460000010000, "update_time" : 1460000010000, "status" : "NORMAL", "status_info" : "" } ] }
  • URI GET /v1/{project_id}/workspaces 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 分页列表的起始页,默认为'0'。 limit 否 Integer 指定每一页返回的最大条目数,默认为'1000'。 sort_by 否 String 指定排序字段,可选'name'、'update_time'、'status',默认是'name'。 order 否 String 可选值。'asc'为递增排序。'desc'为递减排序,默认为'desc'。 enterprise_project_id 否 String 企业项目id,指定此参数会只返回该企业项目id下的工作空间。默认显示所有工作空间。 name 否 String 工作空间名称查询参数,指定此参数会模糊查询该名称的工作空间。默认显示所有工作空间。 filter_accessible 否 Boolean 该参数用于筛选可访问的工作空间。指定该参数为true则会筛选掉当前用户无权限访问的工作空间。该参数默认为false,既为显示所有工作空间。
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 total_count Integer 工作空间的总数。 count Integer 此次请求返回的工作空间个数。 workspaces Array of WorkspaceResponse objects workspace属性列表。 表5 WorkspaceResponse 参数 参数类型 描述 owner String 创建者名称。 auth_type String 授权类型。默认值为PUBLIC。 PUBLIC:租户内部公开访问。 PRIVATE:仅创建者和主账号可访问。 INTERNAL:创建者、主账号、指定IAM子账号可访问,需要与grants参数配合使用。 enterprise_project_id String 企业项目ID。 update_time Integer 最后修改时间,UTC。 create_time Integer 创建时间,UTC。 enterprise_project_name String 企业项目名称。 name String 工作空间名称。 description String 工作空间描述。 id String 工作空间ID,系统生成的32位UUID,不带橫线。默认的工作空间id为'0'。 status String 工作空间状态。 CREATE_FAILED:创建失败。 NORMAL:状态正常。 DELETING:正在删除。 DELETE_FAILED:删除失败。 status_info String 状态描述,默认为空。该字段会补充显示状态的详细信息。如删除失败时,可通过该字段查看删除失败的原因。
  • 响应示例 状态码: 200 OK { "description" : "api-test", "feature" : "NOTEBOOK", "flavor" : "modelarts.vm.cpu.2u", "id" : "f9937afa-4451-42db-a76b-72d624749f66", "image" : { "description" : "description", "id" : "e1a07296-22a8-4f05-8bc8-e936c8e54090", "name" : "notebook2.0-mul-kernel-cpu-cp36", "swr_path" : "swr.xxxxx.com/atelier/notebook2.0-mul-kernel-cpu-cp36:3.3.2-release_v1", "tag" : "3.3.2-release_v1", "type" : "BUILD_IN" }, "lease" : { "create_at" : 1638841744515, "duration" : 3600000, "enable" : true, "type" : "TIMING", "update_at" : 1638841744515 }, "name" : "notebooks_test", "status" : "CREATING", "token" : "3eff13f2-3d70-5456-6dc7-e3f99f562022", "workspace_id" : "0" }
  • 请求示例 创建Notebook实例。设置实例规格为“modelarts.vm.cpu.2u”,存储类型为“EVS”,资源所属为“MANAGED”,存储容量为50G。 { "name" : "notebooks_test", "feature" : "NOTEBOOK", "workspace_id" : "0", "description" : "api-test", "flavor" : "modelarts.vm.cpu.2u", "image_id" : "e1a07296-22a8-4f05-8bc8-e936c8e54090", "volume" : { "category" : "evs", "ownership" : "managed", "capacity" : 50 } }
  • URI POST /v2/{project_id}/workflows/{workflow_id}/executions/{execution_id}/actions 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 workflow_id 是 String 工作流的ID execution_id 是 String 工作流执行ID
  • 响应示例 状态码: 201 OK { "created_at" : "2022-08-25T17:01:52.490825+08:00", "name" : "execution-005", "execution_id" : "4dd2a2f5-bde2-45dd-af6b-5e5d570118d1", "description" : "", "status" : "running", "workspace_id" : "0", "workflow_id" : "bd0ac50e-69b1-4d20-ae38-abb221084fc6", "workflow_name" : "workflow-service-infer", "steps_execution" : [ { "created_at" : "2022-08-25T17:01:52.500034+08:00", "uuid" : "54979c30-cc48-4eaa-8b0f-b6eb6e000bb5", "step_name" : "service_step", "step_title" : "service_step", "status" : "wait_inputs", "duration" : 1, "events" : [ "2022-08-25 17:01:53 change status from init to wait_inputs" ], "policy" : { } } ], "duration" : 1, "events" : [ "2022-08-25 17:01:53 step service_step change status from init to wait_inputs" ], "data_requirements" : [ { "name" : "si_placeholder1", "type" : "model_list", "delay" : true, "conditions" : [ { "attribute" : "model_name", "operator" : "equal", "value" : "model_test444444222222" } ], "used_steps" : [ "service_step" ] }, { "name" : "si_placeholder2", "type" : "model_list", "delay" : true, "conditions" : [ { "attribute" : "model_name", "operator" : "equal", "value" : "model_test444444222222" }, { "attribute" : "envs", "operator" : "equal", "value" : { "infer_address" : "$ref/consumptions/service_step/service_output/access_address" } } ], "used_steps" : [ "service_step2" ] } ], "parameters" : [ { "name" : "schedule_KZ27", "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", "service_step2" ] }, { "name" : "placeholder_name", "type" : "str", "value" : "model_test4444", "used_steps" : [ "service_step", "service_step2" ] } ], "policies" : { } }
  • URI POST /v2/{project_id}/workflows/{workflow_id}/executions/{execution_id}/step-executions/{step_execution_id}/actions 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 workflow_id 是 String 工作流的ID execution_id 是 String 工作流执行ID step_execution_id 是 String 工作流的一次执行中一个节点的执行ID
  • 响应示例 状态码: 201 OK { "created_at" : "2022-11-01T21:36:04.310635+08:00", "uuid" : "2f7ad04a-60cb-4f1c-96fd-dfc9cf96363b", "instance_id" : "{\"model_id\":\"6fe56a95-e7f1-4388-b207-c80684af0cb8\"}", "step_name" : "model_step", "step_title" : "model release", "status" : "completed", "duration" : 15, "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" : "6fe56a95-e7f1-4388-b207-c80684af0cb8" } } ], "properties" : { "model_name" : "lh-xh", "model_type" : "TensorFlow" }, "events" : [ "2022-11-01 21:36:05 change status from init to creating", "2022-11-01 21:36:09 change status from creating to created", "2022-11-01 21:36:09 change status from created to running", "2022-11-01 21:36:19 change status from running to completed" ], "policy" : { } }
  • 请求示例 停止step POST https://{endpoint}/v2/{project_id}/workflows/{workflow_id}/executions/4dd2a2f5-bde2-45dd-af6b-5e5d570118d1/step_executions/255a1079-b00a-4c3a-8218-3458f7546b8d/actions { "action_name" : "stop" }
  • URI POST /v2/{project_id}/training-jobs/{training_job_id}/autosearch-trial-earlystop/{trial_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 training_job_id 是 String 训练作业ID。 trial_id 是 String 超参搜索的trial_id。
  • 请求示例 如下以training_job_id为e346206c-6fde-4c33-9dcd-55be17858ceb的作业为例,提前停止trial_id为50093e6c的trial。 POST https://endpoint/v2/{project_id}/training-jobs/e346206c-6fde-4c33-9dcd-55be17858ceb/autosearch-trial-earlystop/50093e6c
  • 响应示例 状态码: 201 定时调度信息 { "created_at" : "2022-11-02T09:40:52.714656752+08:00", "uuid" : "fa4ac58e-088b-4fd7-ae8c-b36fee50f884", "type" : "time", "content" : { "cron" : "0 0 0 * * Thu", "method" : "fixed" }, "action" : "run", "policies" : { "on_failure" : "retry", "on_running" : "cancel" }, "workflow_id" : "f1642618-43eb-4ab1-a0b1-9cc584182c60", "user_id" : "75540c679ab44074bc100022d8a4b204", "enable" : true }
  • 请求示例 创建workflow定时调度。设置类型为“time”,动作为“run”,调度策略on_failure为“retry”、on_running为“cancel”。 POST https://{endpoint}/v2/{project_id}/workflows/{workflow_id}/schedules { "type" : "time", "action" : "run", "content" : { "cron" : "0 0 0 * * Thu", "method" : "fixed" }, "policies" : { "on_failure" : "retry", "on_running" : "cancel" } }
  • URI GET /v2/{project_id}/training-jobs/{training_job_id}/autosearch-trials 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 training_job_id 是 String 训练作业ID。 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 training_job_id 是 String 训练作业ID。 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Integer 返回的数据条目数。 offset 否 Integer 数据条目偏移量。
  • 响应示例 状态码: 200 ok { "total" : 8, "count" : 8, "limit" : 50, "offset" : 0, "group_by" : "", "items" : { "header" : [ "", "done", "pid", "config", "trial_id", "training_iteration", "time_total_s", "worker_index", "reward_attr", "status", "acc", "loss", "best_reward" ], "data" : [ [ "0", "True", "314", { "batch_size" : 32, "learning_rate" : 0.05512301741232006, "trial_index" : 0, "param/batch_size" : 32, "param/learning_rate" : 0.05512301741232006 }, "ae544174", "2", "19.477163314819336", "", "0.0625", "TERMINATED", "0.0625", "tensor(0.0754, device='cuda:0', requires_grad=True)", "0.0625" ], [ "1", "True", "315", { "batch_size" : 32, "learning_rate" : 0.0785570955603036, "trial_index" : 1, "param/batch_size" : 32, "param/learning_rate" : 0.0785570955603036 }, "ae548666", "2", "3.601897954940796", "", "0.0", "TERMINATED", "0.0", "tensor(0.0760, device='cuda:0', requires_grad=True)", "0.0" ], [ "2", "True", "312", { "batch_size" : 16, "learning_rate" : 0.04015387428829642, "trial_index" : 2, "param/batch_size" : 16, "param/learning_rate" : 0.04015387428829642 }, "ae54c0ea", "2", "3.5978384017944336", "", "0.1875", "TERMINATED", "0.1875", "tensor(0.1469, device='cuda:0', requires_grad=True)", "0.1875" ], [ "3", "True", "313", { "batch_size" : 32, "learning_rate" : 0.0340820322164706, "trial_index" : 3, "param/batch_size" : 32, "param/learning_rate" : 0.0340820322164706 }, "ae5503c0", "2", "3.641200304031372", "", "0.25", "TERMINATED", "0.25", "tensor(0.0716, device='cuda:0', requires_grad=True)", "0.25" ], [ "4", "True", "470", { "batch_size" : 32, "learning_rate" : 0.03656488928171769, "trial_index" : 4, "param/batch_size" : 32, "param/learning_rate" : 0.03656488928171769 }, "bef46590", "2", "3.6120550632476807", "", "0.09375", "TERMINATED", "0.09375", "tensor(0.0740, device='cuda:0', requires_grad=True)", "0.09375" ], [ "5", "True", "499", { "batch_size" : 32, "learning_rate" : 0.008413169003970163, "trial_index" : 5, "param/batch_size" : 32, "param/learning_rate" : 0.008413169003970163 }, "bef578f4", "2", "3.6379287242889404", "", "0.1875", "TERMINATED", "0.1875", "tensor(0.0723, device='cuda:0', requires_grad=True)", "0.1875" ], [ "6", "True", "528", { "batch_size" : 64, "learning_rate" : 0.06297447200613912, "trial_index" : 6, "param/batch_size" : 64, "param/learning_rate" : 0.06297447200613912 }, "bef5c584", "2", "3.711118221282959", "", "0.046875", "TERMINATED", "0.046875", "tensor(0.0381, device='cuda:0', requires_grad=True)", "0.046875" ], [ "7", "True", "557", { "batch_size" : 32, "learning_rate" : 0.04426479392014276, "trial_index" : 7, "param/batch_size" : 32, "param/learning_rate" : 0.04426479392014276 }, "bef60684", "2", "3.6971280574798584", "", "0.0625", "TERMINATED", "0.0625", "tensor(0.0778, device='cuda:0', requires_grad=True)", "0.0625" ] ] } }
  • 请求参数 表2 请求Body参数 参数 是否必选 参数类型 描述 status 否 String 服务包状态 pool_id 是 String 资源池ID service_id 否 String 在线服务ID workflow_id 否 String 工作流ID order 是 WorkflowPoolOrder object 订阅信息 consume_limit 否 Integer 消费限制 current_consume 否 Integer 当前消费 current_date 否 String 当前时间 limit_enable 否 Boolean 限制开关 created_at 否 String 创建时间 package_id 否 String 订阅包的UUID。创建时不需要填,由后台自动生成。 表3 WorkflowPoolOrder 参数 是否必选 参数类型 描述 id 否 String 订阅ID sku 是 SkuInfo object 订阅计费信息 sku_count 是 String 订阅计数 表4 SkuInfo 参数 是否必选 参数类型 描述 code 否 String 计费码 period 否 String 计费时期 queries_limit 否 Long 查询次数 price 否 Float 价格
  • 响应示例 状态码: 201 OK { "created_at" : "2022-10-31T21:49:08.9729616+08:00", "package_id" : "33820375-d1bf-4751-93fe-9d0ee7b6829e", "status" : "available", "pool_id" : "pool-9ad2-04f258c84780d5a52f3bc00dc15aa5e7", "service_id" : "f4e78e17-5af4-4b65-b677-382d0d2e1b84", "workflow_id" : "b0f91eb4-431e-4acd-8d70-ef081435a6d0", "order" : { "id" : " CS 2210201956MBE5Z", "sku" : { "code" : "modelarts.dplan.workflow", "period" : "day", "queries_limit" : 1000, "price" : 4 }, "sku_count" : 1 }, "consume_limit" : 1000 }
  • 响应参数 状态码: 201 表5 响应Body参数 参数 参数类型 描述 status String 服务包状态 pool_id String 资源池ID service_id String 在线服务ID workflow_id String 工作流ID order WorkflowPoolOrder object 订阅信息 consume_limit Integer 消费限制 current_consume Integer 当前消费 current_date String 当前时间 limit_enable Boolean 限制开关 created_at String 创建时间 package_id String 订阅包的UUID。创建时不需要填,由后台自动生成。 表6 WorkflowPoolOrder 参数 参数类型 描述 id String 订阅ID sku SkuInfo object 订阅计费信息 sku_count String 订阅计数 表7 SkuInfo 参数 参数类型 描述 code String 计费码 period String 计费时期 queries_limit Long 查询次数 price Float 价格
  • 请求示例 给指定的工作流购买资源包 POST https://{endpoint}/v2/{project_id}/workflows{workflow_id}/service/packages { "pool_id" : "pool-9ad2-04f258c84780d5a52f3bc00dc15aa5e7", "order" : { "id" : "CS2210201956MBE5Z", "sku" : { "code" : "modelarts.dplan.workflow", "period" : "day", "queries_limit" : 1000, "price" : 10 }, "sku_count" : 1 } }
  • URI GET /v2/{project_id}/workflows/{workflow_id}/schedules/{schedule_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 workflow_id 是 String 工作流的ID schedule_id 是 String 工作流调度信息ID
  • 响应示例 状态码: 200 工作流调度信息 { "created_at" : "2022-11-02T09:40:52.714657+08:00", "uuid" : "fa4ac58e-088b-4fd7-ae8c-b36fee50f884", "type" : "time", "content" : { "cron" : "0 0 0 * * Thu", "method" : "fixed" }, "action" : "run", "policies" : { "on_failure" : "retry", "on_running" : "cancel" }, "workflow_id" : "f1642618-43eb-4ab1-a0b1-9cc584182c60", "user_id" : "75540c679ab44074bc100022d8a4b204", "enable" : true }
  • 响应示例 状态码: 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 }
  • URI GET /v2/{project_id}/workflows/{workflow_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 workflow_id 是 String 工作流的ID 表2 Query参数 参数 是否必选 参数类型 描述 workspace_id 否 String 工作空间ID,用于过滤具体工作空间下的条目
  • 响应参数 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息 状态码: 401 表5 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息 状态码: 403 表6 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息
  • 响应示例 状态码: 200 ok { "search_algo_count" : 3, "search_algo_list" : [ { "name" : "bayes_opt_search", "params" : [ { "key" : "kind", "value" : "ucb", "type" : "String" }, { "key" : "kappa", "value" : "2.5", "type" : "Float" }, { "key" : "xi", "value" : "0.0", "type" : "Float" }, { "key" : "num_samples", "value" : "20", "type" : "Integer" }, { "key" : "seed", "value" : "1", "type" : "Integer" } ], "description" : "Hyperparameter search using Gaussian process." }, { "name" : "tpe_search", "params" : [ { "key" : "gamma", "value" : "0.25", "type" : "Float" }, { "key" : "n_initial_points", "value" : "20", "type" : "Integer" }, { "key" : "num_samples", "value" : "20", "type" : "Integer" }, { "key" : "seed", "value" : "1", "type" : "Integer" } ], "description" : "Hyperparameter search using the tree-structured Parzen estimator algorithm." }, { "name" : "anneal_search", "params" : [ { "key" : "avg_best_idx", "value" : "2.0", "type" : "Float" }, { "key" : "shrink_coef", "value" : "0.1", "type" : "Float" }, { "key" : "num_samples", "value" : "20", "type" : "Integer" }, { "key" : "seed", "value" : "1", "type" : "Integer" } ], "description" : "Hyperparameter search using simulated annealing algorithm." } ] }
共100000条