GetAlgorithmVersion

Updated at:

Retrieve details about an algorithm version.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET /api/v1/algorithms/{AlgorithmId}/versions/{AlgorithmVersion} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

AlgorithmId

string

No

The ID of the algorithm.

algo-xsldfvu1334

AlgorithmVersion

string

No

The version of the algorithm.

v0.0.1

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

The response data.

AlgorithmSpec AlgorithmSpec

Details about the algorithm.

AlgorithmId

string

The ID of the algorithm.

algo-xsldfvu1334

AlgorithmName

string

The name of the algorithm.

llm_training

AlgorithmProvider

string

The provider of the algorithm.

pai

AlgorithmVersion

string

The version of the algorithm.

v0.0.1

GmtCreateTime

string

The time when the algorithm was created.

2024-07-10T11:49:47Z

GmtModifiedTime

string

The time when the algorithm was last updated.

2024-07-10T11:49:47Z

UserId

string

The ID of the user who owns the algorithm.

123456789

TenantId

string

The ID of the tenant who owns the algorithm.

123456789

Examples

Success response

JSON format

{
  "AlgorithmSpec": {
    "OutputChannels": [
      {
        "Description": "模型输出。",
        "Required": true,
        "Properties": {},
        "Name": "Model",
        "SupportedChannelTypes": [
          "oss"
        ]
      }
    ],
    "HyperParameters": [
      {
        "DefaultValue": "0",
        "Type": "Integer",
        "Description": "参数定义了训练的batch_size。",
        "Required": true,
        "Name": "batch_size",
        "Range": {
          "Enum": [
            "0"
          ],
          "MinLength": 1,
          "MaxLength": 30,
          "Minimum": "0",
          "Maximum": "10",
          "ExclusiveMinimum": true,
          "ExclusiveMaximum": true,
          "Pattern": "^\\+?[1-9][0-9]*$"
        },
        "DisplayName": "Batch Size"
      }
    ],
    "JobType": "TFJob",
    "Command": [
      "python train.py"
    ],
    "MetricDefinitions": [
      {
        "Description": "训练损失函数。",
        "Regex": ".*train:loss=([-+]?[0-9]*\\\\.?[0-9]+(?:[eE][-+]?[0-9]+)?).*",
        "Name": "loss"
      }
    ],
    "InputChannels": [
      {
        "Description": "模型输出。",
        "Required": true,
        "Properties": {},
        "Name": "Model",
        "SupportedChannelTypes": [
          "oss"
        ]
      }
    ],
    "SupportsDistributedTraining": true,
    "Image": "registry.cn-shanghai.aliyuncs.com/pai-training/kmeans:v1.0.0",
    "SupportedInstanceTypes": [
      "ecs.g6.2xlarge"
    ],
    "ComputeResource": {
      "Policy": {
        "Version": "V1",
        "Value": "[{\\\"MinTotalCount\\\":1,\\\"MaxTotalCount\\\":4,\\\"RolePolicies\\\":{\\\"chief\\\":{\\\"Count\\\":1},\\\"ps\\\":{\\\"Count\\\":1},\\\"worker\\\":{\\\"Percentage\\\":100}}},{\\\"MinTotalCount\\\":5,\\\"MaxTotalCount\\\":10,\\\"RolePolicies\\\":{\\\"chief\\\":{\\\"Count\\\":1},\\\"ps\\\":{\\\"Percentage\\\":20},\\\"worker\\\":{\\\"Percentage\\\":80}}},{\\\"MinTotalCount\\\":11,\\\"RolePolicies\\\":{\\\"chief\\\":{\\\"Count\\\":1},\\\"ps\\\":{\\\"Percentage\\\":40},\\\"worker\\\":{\\\"Percentage\\\":60}}}]"
      }
    },
    "CodeDir": {
      "LocationType": "OSS",
      "LocationValue": {
        "test": "test",
        "test2": 1
      }
    },
    "Customization": {
      "CodeDir": true
    },
    "ResourceRequirements": [
      {
        "Key": "SupportedMachineTypes",
        "Operator": "in",
        "Values": [
          "ecs.gn5-c4g1.xlarge"
        ]
      }
    ],
    "ProgressDefinitions": {
      "OverallProgress": {
        "Description": "training progress",
        "Regex": "^[0-9]+([.][0-9]+){0,1}$"
      },
      "RemainingTime": {
        "Description": "training remaining time",
        "Regex": "^[0-9]+([.][0-9]+){0,1}$"
      }
    }
  },
  "AlgorithmId": "algo-xsldfvu1334",
  "AlgorithmName": "llm_training",
  "AlgorithmProvider": "pai",
  "AlgorithmVersion": "v0.0.1",
  "GmtCreateTime": "2024-07-10T11:49:47Z",
  "GmtModifiedTime": "2024-07-10T11:49:47Z",
  "UserId": "123456789",
  "TenantId": "123456789"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.