AI开发平台MODELARTS-更新算法:请求示例

时间:2024-10-24 09:20:54

请求示例

如下以修改uuid为2e5451fe-913f-4492-821a-2981031382f7的算法为例。

PUT https://endpoint/v2/{project_id}/algorithms/2e5451fe-913f-4492-821a-2981031382f7

{
  "metadata" : {
    "name" : "TestModelArtsalgorithm",
    "description" : "This is a ModelArts algorithm modified"
  },
  "job_config" : {
    "code_dir" : "/algo-test/pytorch/work1/code/",
    "boot_file" : "/algo-test/pytorch/work1/code/test-pytorch.py",
    "parameters" : [ {
      "name" : "test-parameter",
      "value" : "10",
      "constraint" : {
        "type" : "String",
        "editable" : true,
        "required" : false,
        "sensitive" : false,
        "valid_type" : "None",
        "valid_range" : [ ]
      }
    } ],
    "parameters_customization" : true,
    "inputs" : [ {
      "name" : "data_url",
      "description" : "data source."
    } ],
    "outputs" : [ {
      "name" : "train_url",
      "description" : "model output."
    } ],
    "engine" : {
      "engine_name" : "PyTorch",
      "engine_version" : "PyTorch-1.3.0-python3.6"
    }
  }
}
support.huaweicloud.com/api-modelarts/ChangeAlgorithm.html