ALIYUN::PAI::Run

Updated at: 2025-02-14 09:39

ALIYUN::PAI::Run is used to create a run. A run belongs to an experiment and can be associated with a workload. A run can also represent a single code execution.

Syntax

{
  "Type": "ALIYUN::PAI::Run",
  "Properties": {
    "ExperimentId": String,
    "RunName": String,
    "SourceId": String,
    "SourceType": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Property

Type

Required

Editable

Description

Constraint

ExperimentId

String

Yes

No

The ID of the experiment with which you want to associate the run.

None.

RunName

String

No

Yes

The name of the run.

The following rules apply:

  • The name must start with a letter.

  • It can contain letters, digits, underscores (_), and hyphens (-).

  • It must be 1 to 63 characters in length.

If you leave this property empty when you use ALIYUN::PAI::Run, the server generates a random ID (RunID) as the name.

SourceId

String

No

No

The ID of the Platform for AI

(PAI) workload with which you want to associate the run.

None.

SourceType

String

No

No

The source type of the PAI workload with which you want to associate the run.

Valid values: TrainingService and DLC. This property is empty by default and is optional.

Return values

Fn::GetAtt

  • Accessibility: the access type.

  • SourceType: the source type of the PAI workload that is associated with the run.

  • SourceId: the ID of the PAI workload that is associated with the run.

  • CreateTime: the creation time of the run.

  • WorkspaceId: the ID of the PAI workload.

  • Params: the parameters of the run.

  • Labels: the tags that are added to the run.

  • GmtModifiedTime: the update time of the run.

  • RunName: the name of the run.

  • Metrics: the metrics of the run.

  • OwnerId: the Alibaba Cloud account ID of the run.

  • UserId: the creator ID of the run.

  • ExperimentId: the ID of the experiment that is associated with the run.

  • RunId: the ID of the run.

Examples

YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ExperimentId:
    Type: String
    Description:
      en: Resource attribute field of the experiment ID to which Run belongs.
    Required: true
  RunName:
    Type: String
    Description:
      en: The name of the Run.
    Required: false
Resources:
  ExtensionResource:
    Type: ALIYUN::PAI::Run
    Properties:
      ExperimentId:
        Ref: ExperimentId
      RunName:
        Ref: RunName
Outputs:
  Accessibility:
    Description: Resource attribute fields representing visibility.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Accessibility
  SourceType:
    Description: Run attribute fields representing the source type.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SourceType
  SourceId:
    Description: Attribute Resource field representing the source task ID.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SourceId
  CreateTime:
    Description: The creation time of the Run.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  WorkspaceId:
    Description: Resource attribute field of the workspace ID to which Run belongs.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - WorkspaceId
  Params:
    Description: Resource attribute field representing the run parameter.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Params
  Labels:
    Description: Run attribute field representing the run tag.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Labels
  GmtModifiedTime:
    Description: Resource attribute fields representing edit time.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - GmtModifiedTime
  RunName:
    Description: The name of the Run.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RunName
  Metrics:
    Description: Resource attribute field representing the run metric.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Metrics
  OwnerId:
    Description: Resource attribute field representing owner.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - OwnerId
  UserId:
    Description: Run attribute field representing creator ID.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - UserId
  ExperimentId:
    Description: Resource attribute field of the experiment ID to which Run belongs.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ExperimentId
  RunId:
    Description: The ID of the Run.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RunId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ExperimentId": {
      "Type": "String",
      "Description": {
        "en": "Resource attribute field of the experiment ID to which Run belongs."
      },
      "Required": true
    },
    "RunName": {
      "Type": "String",
      "Description": {
        "en": "The name of the Run."
      },
      "Required": false
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::PAI::Run",
      "Properties": {
        "ExperimentId": {
          "Ref": "ExperimentId"
        },
        "RunName": {
          "Ref": "RunName"
        }
      }
    }
  },
  "Outputs": {
    "Accessibility": {
      "Description": "Resource attribute fields representing visibility.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Accessibility"
        ]
      }
    },
    "SourceType": {
      "Description": "Run attribute fields representing the source type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SourceType"
        ]
      }
    },
    "SourceId": {
      "Description": "Attribute Resource field representing the source task ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SourceId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The creation time of the Run.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "WorkspaceId": {
      "Description": "Resource attribute field of the workspace ID to which Run belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "WorkspaceId"
        ]
      }
    },
    "Params": {
      "Description": "Resource attribute field representing the run parameter.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Params"
        ]
      }
    },
    "Labels": {
      "Description": "Run attribute field representing the run tag.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Labels"
        ]
      }
    },
    "GmtModifiedTime": {
      "Description": "Resource attribute fields representing edit time.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GmtModifiedTime"
        ]
      }
    },
    "RunName": {
      "Description": "The name of the Run.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RunName"
        ]
      }
    },
    "Metrics": {
      "Description": "Resource attribute field representing the run metric.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Metrics"
        ]
      }
    },
    "OwnerId": {
      "Description": "Resource attribute field representing owner.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "OwnerId"
        ]
      }
    },
    "UserId": {
      "Description": "Run attribute field representing creator ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "UserId"
        ]
      }
    },
    "ExperimentId": {
      "Description": "Resource attribute field of the experiment ID to which Run belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ExperimentId"
        ]
      }
    },
    "RunId": {
      "Description": "The ID of the Run.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RunId"
        ]
      }
    }
  }
}
                        
  • On this page (1, T)
  • Syntax
  • Properties
  • Return values
  • Examples
Feedback