华为云用户手册

  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 否 String 消息体的类型。设置为text/plain,返回临时预览链接。设置为application/octet-stream,返回临时下载链接。 X-Auth-Token 是 String 用户token 表3 请求Body参数 参数 是否必选 参数类型 描述 app_name 是 String app名称 app_remark 否 String app备注 workspace_id 否 String 工作空间id
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 app ApigAppDetailInfo object 创建的APP基础信息。 表5 ApigAppDetailInfo 参数 参数类型 描述 app_codes Array of strings APP Code列表,当APP类型为APIC时,此参数为空。 app_id String APP编号。 app_key String APP的key。 app_name String APP名称。 app_remark String APP描述,默认为空。不超过200个字符。 app_secret String APP密钥。 app_type String APP类型。可能取值包括: APIC (该APP注册在roma connect网关上) APIG (该APP注册在共享 API网关上) DEDICATE_APIG(该APP注册在专享 API网关上) bounded_api_count Integer APP绑定API数量。 created_at Long APP创建时间。 project_id String 项目ID。 updated_at Long APP更新时间。 user_id String APP创建用户ID。 状态码: 401 表6 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息 状态码: 404 表8 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息
  • 响应示例 状态码: 200 OK { "app" : { "app_id" : "f29eddd1443e4dceb76898f881c07a4d", "app_name" : "app_xq0XT", "app_remark" : "autotest", "app_key" : "bcb835430eab4c72bd45e2315d98fdb9", "app_secret" : "55816679b0f8447c9d51d2c35e4f679a", "user_id" : "04f258c8fb00d42a1f65c00df88cc4dc", "project_id" : "04f258c84780d5a52f3bc00dc15aa5e7", "app_type" : "APIG", "app_codes" : [ ], "created_at" : 1698745606957, "updated_at" : 1703162969843, "bounded_api_count" : 0 } }
  • 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
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户token。 表3 请求Body参数 参数 是否必选 参数类型 描述 apps 是 Array of Apps objects app列表。 workspace_id 否 String 工作空间id 表4 Apps 参数 是否必选 参数类型 描述 app_id 否 String APP的编号,可通过查询APP列表获取。
  • 响应参数 状态码: 200 表5 响应Header参数 参数 参数类型 描述 X-Request-Id String 链路追踪编号 表6 响应Body参数 参数 参数类型 描述 auth_result Array of AppAuthResultInfo objects 授权结果列表 表7 AppAuthResultInfo 参数 参数类型 描述 api_id String API的编号。 app_id String APP的编号,可通过查询APP列表获取。 auth_id String 授权编号,授权失败时为空。 reason String 授权或者取消授权失败原因,授权成功时为空。 success Boolean 授权或者取消授权是否成功。 状态码: 401 表8 响应Header参数 参数 参数类型 描述 X-Request-Id String 链路追踪编号 表9 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息 状态码: 403 表10 响应Header参数 参数 参数类型 描述 X-Request-Id String 链路追踪编号 表11 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息 状态码: 404 表12 响应Header参数 参数 参数类型 描述 X-Request-Id String 链路追踪编号 表13 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息 状态码: 500 表14 响应Header参数 参数 参数类型 描述 X-Request-Id String 链路追踪编号 表15 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息
  • URI POST /v1/{project_id}/services/{service_id}/app-auth-apis/{api_id}/app-auth-api 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID。 service_id 是 String API所属的服务ID。 api_id 是 String API编号。
  • 请求示例 创建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" } }
  • 响应示例 状态码: 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 }
  • 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" ] ] } }
  • 响应示例 状态码: 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 }
  • 请求示例 给指定的工作流购买资源包 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 } }
  • 响应参数 状态码: 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 价格
  • 请求参数 表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 价格
  • 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,用于过滤具体工作空间下的条目
  • 请求示例 如下以更新“real-time”类型的服务为例。 PUT https://{endpoint}/v1/{project_id}/services/{service_id} { "description" : "", "status" : "running", "config" : [ { "model_id" : "xxxx", "weight" : "100", "specification" : "modelarts.vm.cpu.2u", "instance_count" : 1 } ] }
  • 请求参数 表2 请求Body参数 参数 是否必选 参数类型 描述 offset 否 Integer 查询作业的页数,最小为0。例如设置为0,则表示从第一页开始查询。 limit 否 Integer 查询作业的每页条目数。最小为1,最大为50。 sort_by 否 String 查询作业排列顺序的指标。默认使用create_time排序。 order 否 String 查询作业排列顺序,默认为“desc”,降序排序。也可以选择对应的“asc”,升序排序。 group_by 否 String 查询作业要搜索的分组条件。 filters 否 Array of filters objects 查询作业要过滤的一系列条件。 表3 filters 参数 是否必选 参数类型 描述 key 否 String 分组条件键值。 operator 否 String 分组条件键值键关系,支持between(范围)、like(类似)、in(包含)、not(非)。 value 否 Array of strings 分组条件键对应值。
  • 响应示例 状态码: 200 ok { "total" : 5059, "count" : 1, "limit" : 1, "offset" : 0, "sort_by" : "create_time", "order" : "desc", "group_by" : "", "workspace_id" : "0", "ai_project" : "default-ai-project", "items" : [ { "kind" : "job", "metadata" : { "id" : "3faf5c03-aaa1-4cbe-879d-24b05d997347", "name" : "trainjob--py14_mem06-byd-108", "description" : "", "create_time" : 1636447346315, "workspace_id" : "0", "user_name" : "ei_modelarts_q00357245_01" }, "status" : { "phase" : "Abnormal", "secondary_phase" : "CreateFailed", "duration" : 0, "start_time" : 0, "node_count_metrics" : [ [ 1636447746000, 0 ], [ 1636447755000, 0 ], [ 1636447756000, 0 ] ], "tasks" : [ "worker-0" ] }, "algorithm" : { "code_dir" : "obs://test-crq/economic_test/py_minist/", "boot_file" : "obs://test-crq/economic_test/py_minist/minist_common.py", "inputs" : [ { "name" : "data_url", "local_dir" : "/home/ma-user/modelarts/inputs/data_url_0", "remote" : { "obs" : { "obs_url" : "/test-crq/data/py_minist/" } } } ], "outputs" : [ { "name" : "train_url", "local_dir" : "/home/ma-user/modelarts/outputs/train_url_0", "remote" : { "obs" : { "obs_url" : "/test-crq/train_output/" } } } ], "engine" : { "engine_id" : "pytorch-cp36-1.4.0-v2", "engine_name" : "PyTorch", "engine_version" : "PyTorch-1.4.0-python3.6-v2" } }, "spec" : { "resource" : { "policy" : "economic", "flavor_id" : "modelarts.vm.p100.large.eco", "flavor_name" : "Computing GPU(P100) instance", "node_count" : 1, "flavor_detail" : { "flavor_type" : "GPU", "billing" : { "code" : "modelarts.vm.gpu.p100.eco", "unit_num" : 1 }, "flavor_info" : { "cpu" : { "arch" : "x86", "core_num" : 8 }, "gpu" : { "unit_num" : 1, "product_name" : "NVIDIA-P100", "memory" : "8GB" }, "memory" : { "size" : 64, "unit" : "GB" } } } } } } ] }
  • 请求示例 查询训练作业。设置查询训练作业限制个数为1,查询作业名称中包含trainjob的所有训练作业数据。 POST https://endpoint/v2/{project_id}/training-job-searches?limit=1 { "offset" : 0, "limit" : 1, "filters" : [ { "key" : "name", "operator" : "like", "value" : [ "trainjob" ] }, { "key" : "create_time", "operator" : "between", "value" : [ "", "" ] }, { "key" : "phase", "operator" : "in", "value" : [ "" ] }, { "key" : "algorithm_name", "operator" : "like", "value" : [ "" ] }, { "key" : "kind", "operator" : "in", "value" : [ ] }, { "key" : "user_id", "operator" : "in", "value" : [ "" ] } ] }
  • 响应示例 状态码: 200 OK { "app" : { "app_id" : "logic-app-7ded3898-8306-49ee-a1df-2708f9aac83a", "app_name" : "app_c8ae", "app_key" : "9cdbfd0b65364fbe8b1c6cf29255a46f", "app_secret" : "c736b99bdc33403ab0652bf91c00e99e", "user_id" : "04f258c8fb00d42a1f65c00df88cc4dc", "project_id" : "04f258c84780d5a52f3bc00dc15aa5e7", "app_type" : "DEDICATE_APIG", "app_codes" : [ ], "created_at" : 1703162733450, "updated_at" : 1703162733450, "bounded_api_count" : 0 } }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 app ApigAppDetailInfo object 创建的APP基础信息。 表5 ApigAppDetailInfo 参数 参数类型 描述 app_codes Array of strings APP Code列表,当APP类型为APIC时,此参数为空。 app_id String APP编号。 app_key String APP的key。 app_name String APP名称。 app_remark String APP描述,默认为空。不超过200个字符。 app_secret String APP密钥。 app_type String APP类型。可能取值包括: APIC (该APP注册在roma connect网关上) APIG (该APP注册在共享 API网关上) DEDICATE_APIG(该APP注册在专享 API网关上) bounded_api_count Integer APP绑定API数量。 created_at Long APP创建时间。 project_id String 项目ID。 updated_at Long APP更新时间。 user_id String APP创建用户ID。 状态码: 401 表6 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息 状态码: 404 表8 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码 error_msg String 具体错误信息
  • URI GET /v1/{project_id}/app-auth/apps/{app_id} 表1 路径参数 参数 是否必选 参数类型 描述 app_id 是 String APP ID project_id 是 String 用户项目ID。获取方法请参见获取项目ID。 表2 Query参数 参数 是否必选 参数类型 描述 workspace_id 否 String 工作空间id iphertext_enabled 否 Boolean 是否明文展示
  • 响应参数 状态码: 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 具体错误信息
  • 响应示例 状态码: 202 ok { "kind" : "job", "metadata" : { "id" : "cf63aba9-63b1-4219-b717-708a2665100b", "name" : "trainjob--py14_mem06-110", "description" : "", "create_time" : 1636515222282, "workspace_id" : "0", "user_name" : "ei_modelarts_z00424192_01" }, "status" : { "phase" : "Terminating", "secondary_phase" : "Terminating", "duration" : 0, "start_time" : 0, "node_count_metrics" : null, "tasks" : [ "worker-0" ] }, "algorithm" : { "code_dir" : "obs://test/economic_test/py_minist/", "boot_file" : "obs://test/economic_test/py_minist/minist_common.py", "inputs" : [ { "name" : "data_url", "local_dir" : "/home/ma-user/modelarts/inputs/data_url_0", "remote" : { "obs" : { "obs_url" : "/test/data/py_minist/" } } } ], "outputs" : [ { "name" : "train_url", "local_dir" : "/home/ma-user/modelarts/outputs/train_url_0", "remote" : { "obs" : { "obs_url" : "/test/train_output/" } } } ], "engine" : { "engine_id" : "pytorch-cp36-1.4.0-v2", "engine_name" : "PyTorch", "engine_version" : "PyTorch-1.4.0-python3.6-v2" } }, "spec" : { "resource" : { "policy" : "economic", "flavor_id" : "modelarts.vm.p100.large.eco", "flavor_name" : "Computing GPU(P100) instance", "node_count" : 1, "flavor_detail" : { "flavor_type" : "GPU", "billing" : { "code" : "modelarts.vm.gpu.p100.eco", "unit_num" : 1 }, "flavor_info" : { "cpu" : { "arch" : "x86", "core_num" : 8 }, "gpu" : { "unit_num" : 1, "product_name" : "NVIDIA-P100", "memory" : "8GB" }, "memory" : { "size" : 64, "unit" : "GB" } } } } } }
  • 响应示例 状态码: 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条