alicloud.pai.WorkspaceModelVersion
Explore with Pulumi AI
Provides a PAI Workspace Model Version resource.
For information about PAI Workspace Model Version and how to use it, see What is Model Version.
NOTE: Available since v1.248.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "terraform_example";
const _default = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultDI9fsL = new alicloud.pai.WorkspaceWorkspace("defaultDI9fsL", {
description: "802",
displayName: name,
workspaceName: `${name}_${_default.result}`,
envTypes: ["prod"],
});
const defaultsHptEL = new alicloud.pai.WorkspaceModel("defaultsHptEL", {
modelName: name,
workspaceId: defaultDI9fsL.id,
origin: "Civitai",
task: "text-to-image-synthesis",
accessibility: "PRIVATE",
modelType: "Checkpoint",
orderNumber: 1,
modelDescription: "ModelDescription.",
modelDoc: "https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors",
domain: "aigc",
labels: [{
key: "base_model",
value: "SD 1.5",
}],
extraInfo: {
test: "15",
},
});
const defaultWorkspaceModelVersion = new alicloud.pai.WorkspaceModelVersion("default", {
versionDescription: "VersionDescription.",
sourceType: "TrainingService",
sourceId: "region=${region},workspaceId=${workspace_id},kind=TrainingJob,id=job-id",
extraInfo: {
test: "15",
},
trainingSpec: {
test: "TrainingSpec",
},
uri: "oss://hz-example-0701.oss-cn-hangzhou-internal.aliyuncs.com/checkpoints/",
inferenceSpec: {
test: "InferenceSpec",
},
modelId: defaultsHptEL.id,
formatType: "SavedModel",
approvalStatus: "Pending",
frameworkType: "PyTorch",
versionName: "1.0.0",
metrics: {},
labels: [{
key: "k1",
value: "vs1",
}],
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform_example"
default = random.index.Integer("default",
min=10000,
max=99999)
default_di9fs_l = alicloud.pai.WorkspaceWorkspace("defaultDI9fsL",
description="802",
display_name=name,
workspace_name=f"{name}_{default['result']}",
env_types=["prod"])
defaults_hpt_el = alicloud.pai.WorkspaceModel("defaultsHptEL",
model_name=name,
workspace_id=default_di9fs_l.id,
origin="Civitai",
task="text-to-image-synthesis",
accessibility="PRIVATE",
model_type="Checkpoint",
order_number=1,
model_description="ModelDescription.",
model_doc="https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors",
domain="aigc",
labels=[{
"key": "base_model",
"value": "SD 1.5",
}],
extra_info={
"test": "15",
})
default_workspace_model_version = alicloud.pai.WorkspaceModelVersion("default",
version_description="VersionDescription.",
source_type="TrainingService",
source_id="region=${region},workspaceId=${workspace_id},kind=TrainingJob,id=job-id",
extra_info={
"test": "15",
},
training_spec={
"test": "TrainingSpec",
},
uri="oss://hz-example-0701.oss-cn-hangzhou-internal.aliyuncs.com/checkpoints/",
inference_spec={
"test": "InferenceSpec",
},
model_id=defaults_hpt_el.id,
format_type="SavedModel",
approval_status="Pending",
framework_type="PyTorch",
version_name="1.0.0",
metrics={},
labels=[{
"key": "k1",
"value": "vs1",
}])
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/pai"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform_example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
defaultDI9fsL, err := pai.NewWorkspaceWorkspace(ctx, "defaultDI9fsL", &pai.WorkspaceWorkspaceArgs{
Description: pulumi.String("802"),
DisplayName: pulumi.String(name),
WorkspaceName: pulumi.Sprintf("%v_%v", name, _default.Result),
EnvTypes: pulumi.StringArray{
pulumi.String("prod"),
},
})
if err != nil {
return err
}
defaultsHptEL, err := pai.NewWorkspaceModel(ctx, "defaultsHptEL", &pai.WorkspaceModelArgs{
ModelName: pulumi.String(name),
WorkspaceId: defaultDI9fsL.ID(),
Origin: pulumi.String("Civitai"),
Task: pulumi.String("text-to-image-synthesis"),
Accessibility: pulumi.String("PRIVATE"),
ModelType: pulumi.String("Checkpoint"),
OrderNumber: pulumi.Int(1),
ModelDescription: pulumi.String("ModelDescription."),
ModelDoc: pulumi.String("https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors"),
Domain: pulumi.String("aigc"),
Labels: pai.WorkspaceModelLabelArray{
&pai.WorkspaceModelLabelArgs{
Key: pulumi.String("base_model"),
Value: pulumi.String("SD 1.5"),
},
},
ExtraInfo: pulumi.StringMap{
"test": pulumi.String("15"),
},
})
if err != nil {
return err
}
_, err = pai.NewWorkspaceModelVersion(ctx, "default", &pai.WorkspaceModelVersionArgs{
VersionDescription: pulumi.String("VersionDescription."),
SourceType: pulumi.String("TrainingService"),
SourceId: pulumi.String("region=${region},workspaceId=${workspace_id},kind=TrainingJob,id=job-id"),
ExtraInfo: pulumi.StringMap{
"test": pulumi.String("15"),
},
TrainingSpec: pulumi.StringMap{
"test": pulumi.String("TrainingSpec"),
},
Uri: pulumi.String("oss://hz-example-0701.oss-cn-hangzhou-internal.aliyuncs.com/checkpoints/"),
InferenceSpec: pulumi.StringMap{
"test": pulumi.String("InferenceSpec"),
},
ModelId: defaultsHptEL.ID(),
FormatType: pulumi.String("SavedModel"),
ApprovalStatus: pulumi.String("Pending"),
FrameworkType: pulumi.String("PyTorch"),
VersionName: pulumi.String("1.0.0"),
Metrics: pulumi.StringMap{},
Labels: pai.WorkspaceModelVersionLabelArray{
&pai.WorkspaceModelVersionLabelArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("vs1"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform_example";
var @default = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultDI9fsL = new AliCloud.Pai.WorkspaceWorkspace("defaultDI9fsL", new()
{
Description = "802",
DisplayName = name,
WorkspaceName = $"{name}_{@default.Result}",
EnvTypes = new[]
{
"prod",
},
});
var defaultsHptEL = new AliCloud.Pai.WorkspaceModel("defaultsHptEL", new()
{
ModelName = name,
WorkspaceId = defaultDI9fsL.Id,
Origin = "Civitai",
Task = "text-to-image-synthesis",
Accessibility = "PRIVATE",
ModelType = "Checkpoint",
OrderNumber = 1,
ModelDescription = "ModelDescription.",
ModelDoc = "https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors",
Domain = "aigc",
Labels = new[]
{
new AliCloud.Pai.Inputs.WorkspaceModelLabelArgs
{
Key = "base_model",
Value = "SD 1.5",
},
},
ExtraInfo =
{
{ "test", "15" },
},
});
var defaultWorkspaceModelVersion = new AliCloud.Pai.WorkspaceModelVersion("default", new()
{
VersionDescription = "VersionDescription.",
SourceType = "TrainingService",
SourceId = "region=${region},workspaceId=${workspace_id},kind=TrainingJob,id=job-id",
ExtraInfo =
{
{ "test", "15" },
},
TrainingSpec =
{
{ "test", "TrainingSpec" },
},
Uri = "oss://hz-example-0701.oss-cn-hangzhou-internal.aliyuncs.com/checkpoints/",
InferenceSpec =
{
{ "test", "InferenceSpec" },
},
ModelId = defaultsHptEL.Id,
FormatType = "SavedModel",
ApprovalStatus = "Pending",
FrameworkType = "PyTorch",
VersionName = "1.0.0",
Metrics = null,
Labels = new[]
{
new AliCloud.Pai.Inputs.WorkspaceModelVersionLabelArgs
{
Key = "k1",
Value = "vs1",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.integerArgs;
import com.pulumi.alicloud.pai.WorkspaceWorkspace;
import com.pulumi.alicloud.pai.WorkspaceWorkspaceArgs;
import com.pulumi.alicloud.pai.WorkspaceModel;
import com.pulumi.alicloud.pai.WorkspaceModelArgs;
import com.pulumi.alicloud.pai.inputs.WorkspaceModelLabelArgs;
import com.pulumi.alicloud.pai.WorkspaceModelVersion;
import com.pulumi.alicloud.pai.WorkspaceModelVersionArgs;
import com.pulumi.alicloud.pai.inputs.WorkspaceModelVersionLabelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform_example");
var default_ = new Integer("default", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultDI9fsL = new WorkspaceWorkspace("defaultDI9fsL", WorkspaceWorkspaceArgs.builder()
.description("802")
.displayName(name)
.workspaceName(String.format("%s_%s", name,default_.result()))
.envTypes("prod")
.build());
var defaultsHptEL = new WorkspaceModel("defaultsHptEL", WorkspaceModelArgs.builder()
.modelName(name)
.workspaceId(defaultDI9fsL.id())
.origin("Civitai")
.task("text-to-image-synthesis")
.accessibility("PRIVATE")
.modelType("Checkpoint")
.orderNumber(1)
.modelDescription("ModelDescription.")
.modelDoc("https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors")
.domain("aigc")
.labels(WorkspaceModelLabelArgs.builder()
.key("base_model")
.value("SD 1.5")
.build())
.extraInfo(Map.of("test", "15"))
.build());
var defaultWorkspaceModelVersion = new WorkspaceModelVersion("defaultWorkspaceModelVersion", WorkspaceModelVersionArgs.builder()
.versionDescription("VersionDescription.")
.sourceType("TrainingService")
.sourceId("region=${region},workspaceId=${workspace_id},kind=TrainingJob,id=job-id")
.extraInfo(Map.of("test", "15"))
.trainingSpec(Map.of("test", "TrainingSpec"))
.uri("oss://hz-example-0701.oss-cn-hangzhou-internal.aliyuncs.com/checkpoints/")
.inferenceSpec(Map.of("test", "InferenceSpec"))
.modelId(defaultsHptEL.id())
.formatType("SavedModel")
.approvalStatus("Pending")
.frameworkType("PyTorch")
.versionName("1.0.0")
.metrics(Map.ofEntries(
))
.labels(WorkspaceModelVersionLabelArgs.builder()
.key("k1")
.value("vs1")
.build())
.build());
}
}
configuration:
name:
type: string
default: terraform_example
resources:
default:
type: random:integer
properties:
min: 10000
max: 99999
defaultDI9fsL:
type: alicloud:pai:WorkspaceWorkspace
properties:
description: '802'
displayName: ${name}
workspaceName: ${name}_${default.result}
envTypes:
- prod
defaultsHptEL:
type: alicloud:pai:WorkspaceModel
properties:
modelName: ${name}
workspaceId: ${defaultDI9fsL.id}
origin: Civitai
task: text-to-image-synthesis
accessibility: PRIVATE
modelType: Checkpoint
orderNumber: '1'
modelDescription: ModelDescription.
modelDoc: https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors
domain: aigc
labels:
- key: base_model
value: SD 1.5
extraInfo:
test: '15'
defaultWorkspaceModelVersion:
type: alicloud:pai:WorkspaceModelVersion
name: default
properties:
versionDescription: VersionDescription.
sourceType: TrainingService
sourceId: region=$${region},workspaceId=$${workspace_id},kind=TrainingJob,id=job-id
extraInfo:
test: '15'
trainingSpec:
test: TrainingSpec
uri: oss://hz-example-0701.oss-cn-hangzhou-internal.aliyuncs.com/checkpoints/
inferenceSpec:
test: InferenceSpec
modelId: ${defaultsHptEL.id}
formatType: SavedModel
approvalStatus: Pending
frameworkType: PyTorch
versionName: 1.0.0
metrics: {}
labels:
- key: k1
value: vs1
Create WorkspaceModelVersion Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkspaceModelVersion(name: string, args: WorkspaceModelVersionArgs, opts?: CustomResourceOptions);
@overload
def WorkspaceModelVersion(resource_name: str,
args: WorkspaceModelVersionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkspaceModelVersion(resource_name: str,
opts: Optional[ResourceOptions] = None,
model_id: Optional[str] = None,
uri: Optional[str] = None,
metrics: Optional[Mapping[str, str]] = None,
framework_type: Optional[str] = None,
inference_spec: Optional[Mapping[str, str]] = None,
labels: Optional[Sequence[WorkspaceModelVersionLabelArgs]] = None,
approval_status: Optional[str] = None,
format_type: Optional[str] = None,
options: Optional[str] = None,
source_id: Optional[str] = None,
source_type: Optional[str] = None,
training_spec: Optional[Mapping[str, str]] = None,
extra_info: Optional[Mapping[str, str]] = None,
version_description: Optional[str] = None,
version_name: Optional[str] = None)
func NewWorkspaceModelVersion(ctx *Context, name string, args WorkspaceModelVersionArgs, opts ...ResourceOption) (*WorkspaceModelVersion, error)
public WorkspaceModelVersion(string name, WorkspaceModelVersionArgs args, CustomResourceOptions? opts = null)
public WorkspaceModelVersion(String name, WorkspaceModelVersionArgs args)
public WorkspaceModelVersion(String name, WorkspaceModelVersionArgs args, CustomResourceOptions options)
type: alicloud:pai:WorkspaceModelVersion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WorkspaceModelVersionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WorkspaceModelVersionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WorkspaceModelVersionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceModelVersionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkspaceModelVersionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var workspaceModelVersionResource = new AliCloud.Pai.WorkspaceModelVersion("workspaceModelVersionResource", new()
{
ModelId = "string",
Uri = "string",
Metrics =
{
{ "string", "string" },
},
FrameworkType = "string",
InferenceSpec =
{
{ "string", "string" },
},
Labels = new[]
{
new AliCloud.Pai.Inputs.WorkspaceModelVersionLabelArgs
{
Key = "string",
Value = "string",
},
},
ApprovalStatus = "string",
FormatType = "string",
Options = "string",
SourceId = "string",
SourceType = "string",
TrainingSpec =
{
{ "string", "string" },
},
ExtraInfo =
{
{ "string", "string" },
},
VersionDescription = "string",
VersionName = "string",
});
example, err := pai.NewWorkspaceModelVersion(ctx, "workspaceModelVersionResource", &pai.WorkspaceModelVersionArgs{
ModelId: pulumi.String("string"),
Uri: pulumi.String("string"),
Metrics: pulumi.StringMap{
"string": pulumi.String("string"),
},
FrameworkType: pulumi.String("string"),
InferenceSpec: pulumi.StringMap{
"string": pulumi.String("string"),
},
Labels: pai.WorkspaceModelVersionLabelArray{
&pai.WorkspaceModelVersionLabelArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
ApprovalStatus: pulumi.String("string"),
FormatType: pulumi.String("string"),
Options: pulumi.String("string"),
SourceId: pulumi.String("string"),
SourceType: pulumi.String("string"),
TrainingSpec: pulumi.StringMap{
"string": pulumi.String("string"),
},
ExtraInfo: pulumi.StringMap{
"string": pulumi.String("string"),
},
VersionDescription: pulumi.String("string"),
VersionName: pulumi.String("string"),
})
var workspaceModelVersionResource = new WorkspaceModelVersion("workspaceModelVersionResource", WorkspaceModelVersionArgs.builder()
.modelId("string")
.uri("string")
.metrics(Map.of("string", "string"))
.frameworkType("string")
.inferenceSpec(Map.of("string", "string"))
.labels(WorkspaceModelVersionLabelArgs.builder()
.key("string")
.value("string")
.build())
.approvalStatus("string")
.formatType("string")
.options("string")
.sourceId("string")
.sourceType("string")
.trainingSpec(Map.of("string", "string"))
.extraInfo(Map.of("string", "string"))
.versionDescription("string")
.versionName("string")
.build());
workspace_model_version_resource = alicloud.pai.WorkspaceModelVersion("workspaceModelVersionResource",
model_id="string",
uri="string",
metrics={
"string": "string",
},
framework_type="string",
inference_spec={
"string": "string",
},
labels=[{
"key": "string",
"value": "string",
}],
approval_status="string",
format_type="string",
options="string",
source_id="string",
source_type="string",
training_spec={
"string": "string",
},
extra_info={
"string": "string",
},
version_description="string",
version_name="string")
const workspaceModelVersionResource = new alicloud.pai.WorkspaceModelVersion("workspaceModelVersionResource", {
modelId: "string",
uri: "string",
metrics: {
string: "string",
},
frameworkType: "string",
inferenceSpec: {
string: "string",
},
labels: [{
key: "string",
value: "string",
}],
approvalStatus: "string",
formatType: "string",
options: "string",
sourceId: "string",
sourceType: "string",
trainingSpec: {
string: "string",
},
extraInfo: {
string: "string",
},
versionDescription: "string",
versionName: "string",
});
type: alicloud:pai:WorkspaceModelVersion
properties:
approvalStatus: string
extraInfo:
string: string
formatType: string
frameworkType: string
inferenceSpec:
string: string
labels:
- key: string
value: string
metrics:
string: string
modelId: string
options: string
sourceId: string
sourceType: string
trainingSpec:
string: string
uri: string
versionDescription: string
versionName: string
WorkspaceModelVersion Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The WorkspaceModelVersion resource accepts the following input properties:
- Model
Id string - The model ID.
- Uri string
- The URI of the model version.
- Approval
Status string - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- Extra
Info Dictionary<string, string> - Other information.
- Format
Type string - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- Framework
Type string - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- Inference
Spec Dictionary<string, string> - Describes how to apply to downstream inference services.
- Labels
List<Pulumi.
Ali Cloud. Pai. Inputs. Workspace Model Version Label> - List of model version labels. See
labels
below. - Metrics Dictionary<string, string>
- The metrics for the model. The serialized length is limited to 8192.
- Options string
- The extended field. This is a JSON string.
- Source
Id string - The source ID.
- Source
Type string - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- Training
Spec Dictionary<string, string> - The training configurations. Used for fine-tuning and incremental training.
- Version
Description string - The version descriptions.
- Version
Name string - The Model version.
- Model
Id string - The model ID.
- Uri string
- The URI of the model version.
- Approval
Status string - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- Extra
Info map[string]string - Other information.
- Format
Type string - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- Framework
Type string - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- Inference
Spec map[string]string - Describes how to apply to downstream inference services.
- Labels
[]Workspace
Model Version Label Args - List of model version labels. See
labels
below. - Metrics map[string]string
- The metrics for the model. The serialized length is limited to 8192.
- Options string
- The extended field. This is a JSON string.
- Source
Id string - The source ID.
- Source
Type string - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- Training
Spec map[string]string - The training configurations. Used for fine-tuning and incremental training.
- Version
Description string - The version descriptions.
- Version
Name string - The Model version.
- model
Id String - The model ID.
- uri String
- The URI of the model version.
- approval
Status String - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- extra
Info Map<String,String> - Other information.
- format
Type String - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- framework
Type String - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- inference
Spec Map<String,String> - Describes how to apply to downstream inference services.
- labels
List<Workspace
Model Version Label> - List of model version labels. See
labels
below. - metrics Map<String,String>
- The metrics for the model. The serialized length is limited to 8192.
- options String
- The extended field. This is a JSON string.
- source
Id String - The source ID.
- source
Type String - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- training
Spec Map<String,String> - The training configurations. Used for fine-tuning and incremental training.
- version
Description String - The version descriptions.
- version
Name String - The Model version.
- model
Id string - The model ID.
- uri string
- The URI of the model version.
- approval
Status string - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- extra
Info {[key: string]: string} - Other information.
- format
Type string - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- framework
Type string - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- inference
Spec {[key: string]: string} - Describes how to apply to downstream inference services.
- labels
Workspace
Model Version Label[] - List of model version labels. See
labels
below. - metrics {[key: string]: string}
- The metrics for the model. The serialized length is limited to 8192.
- options string
- The extended field. This is a JSON string.
- source
Id string - The source ID.
- source
Type string - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- training
Spec {[key: string]: string} - The training configurations. Used for fine-tuning and incremental training.
- version
Description string - The version descriptions.
- version
Name string - The Model version.
- model_
id str - The model ID.
- uri str
- The URI of the model version.
- approval_
status str - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- extra_
info Mapping[str, str] - Other information.
- format_
type str - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- framework_
type str - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- inference_
spec Mapping[str, str] - Describes how to apply to downstream inference services.
- labels
Sequence[Workspace
Model Version Label Args] - List of model version labels. See
labels
below. - metrics Mapping[str, str]
- The metrics for the model. The serialized length is limited to 8192.
- options str
- The extended field. This is a JSON string.
- source_
id str - The source ID.
- source_
type str - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- training_
spec Mapping[str, str] - The training configurations. Used for fine-tuning and incremental training.
- version_
description str - The version descriptions.
- version_
name str - The Model version.
- model
Id String - The model ID.
- uri String
- The URI of the model version.
- approval
Status String - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- extra
Info Map<String> - Other information.
- format
Type String - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- framework
Type String - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- inference
Spec Map<String> - Describes how to apply to downstream inference services.
- labels List<Property Map>
- List of model version labels. See
labels
below. - metrics Map<String>
- The metrics for the model. The serialized length is limited to 8192.
- options String
- The extended field. This is a JSON string.
- source
Id String - The source ID.
- source
Type String - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- training
Spec Map<String> - The training configurations. Used for fine-tuning and incremental training.
- version
Description String - The version descriptions.
- version
Name String - The Model version.
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkspaceModelVersion resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing WorkspaceModelVersion Resource
Get an existing WorkspaceModelVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WorkspaceModelVersionState, opts?: CustomResourceOptions): WorkspaceModelVersion
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
approval_status: Optional[str] = None,
extra_info: Optional[Mapping[str, str]] = None,
format_type: Optional[str] = None,
framework_type: Optional[str] = None,
inference_spec: Optional[Mapping[str, str]] = None,
labels: Optional[Sequence[WorkspaceModelVersionLabelArgs]] = None,
metrics: Optional[Mapping[str, str]] = None,
model_id: Optional[str] = None,
options: Optional[str] = None,
source_id: Optional[str] = None,
source_type: Optional[str] = None,
training_spec: Optional[Mapping[str, str]] = None,
uri: Optional[str] = None,
version_description: Optional[str] = None,
version_name: Optional[str] = None) -> WorkspaceModelVersion
func GetWorkspaceModelVersion(ctx *Context, name string, id IDInput, state *WorkspaceModelVersionState, opts ...ResourceOption) (*WorkspaceModelVersion, error)
public static WorkspaceModelVersion Get(string name, Input<string> id, WorkspaceModelVersionState? state, CustomResourceOptions? opts = null)
public static WorkspaceModelVersion get(String name, Output<String> id, WorkspaceModelVersionState state, CustomResourceOptions options)
resources: _: type: alicloud:pai:WorkspaceModelVersion get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Approval
Status string - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- Extra
Info Dictionary<string, string> - Other information.
- Format
Type string - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- Framework
Type string - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- Inference
Spec Dictionary<string, string> - Describes how to apply to downstream inference services.
- Labels
List<Pulumi.
Ali Cloud. Pai. Inputs. Workspace Model Version Label> - List of model version labels. See
labels
below. - Metrics Dictionary<string, string>
- The metrics for the model. The serialized length is limited to 8192.
- Model
Id string - The model ID.
- Options string
- The extended field. This is a JSON string.
- Source
Id string - The source ID.
- Source
Type string - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- Training
Spec Dictionary<string, string> - The training configurations. Used for fine-tuning and incremental training.
- Uri string
- The URI of the model version.
- Version
Description string - The version descriptions.
- Version
Name string - The Model version.
- Approval
Status string - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- Extra
Info map[string]string - Other information.
- Format
Type string - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- Framework
Type string - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- Inference
Spec map[string]string - Describes how to apply to downstream inference services.
- Labels
[]Workspace
Model Version Label Args - List of model version labels. See
labels
below. - Metrics map[string]string
- The metrics for the model. The serialized length is limited to 8192.
- Model
Id string - The model ID.
- Options string
- The extended field. This is a JSON string.
- Source
Id string - The source ID.
- Source
Type string - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- Training
Spec map[string]string - The training configurations. Used for fine-tuning and incremental training.
- Uri string
- The URI of the model version.
- Version
Description string - The version descriptions.
- Version
Name string - The Model version.
- approval
Status String - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- extra
Info Map<String,String> - Other information.
- format
Type String - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- framework
Type String - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- inference
Spec Map<String,String> - Describes how to apply to downstream inference services.
- labels
List<Workspace
Model Version Label> - List of model version labels. See
labels
below. - metrics Map<String,String>
- The metrics for the model. The serialized length is limited to 8192.
- model
Id String - The model ID.
- options String
- The extended field. This is a JSON string.
- source
Id String - The source ID.
- source
Type String - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- training
Spec Map<String,String> - The training configurations. Used for fine-tuning and incremental training.
- uri String
- The URI of the model version.
- version
Description String - The version descriptions.
- version
Name String - The Model version.
- approval
Status string - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- extra
Info {[key: string]: string} - Other information.
- format
Type string - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- framework
Type string - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- inference
Spec {[key: string]: string} - Describes how to apply to downstream inference services.
- labels
Workspace
Model Version Label[] - List of model version labels. See
labels
below. - metrics {[key: string]: string}
- The metrics for the model. The serialized length is limited to 8192.
- model
Id string - The model ID.
- options string
- The extended field. This is a JSON string.
- source
Id string - The source ID.
- source
Type string - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- training
Spec {[key: string]: string} - The training configurations. Used for fine-tuning and incremental training.
- uri string
- The URI of the model version.
- version
Description string - The version descriptions.
- version
Name string - The Model version.
- approval_
status str - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- extra_
info Mapping[str, str] - Other information.
- format_
type str - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- framework_
type str - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- inference_
spec Mapping[str, str] - Describes how to apply to downstream inference services.
- labels
Sequence[Workspace
Model Version Label Args] - List of model version labels. See
labels
below. - metrics Mapping[str, str]
- The metrics for the model. The serialized length is limited to 8192.
- model_
id str - The model ID.
- options str
- The extended field. This is a JSON string.
- source_
id str - The source ID.
- source_
type str - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- training_
spec Mapping[str, str] - The training configurations. Used for fine-tuning and incremental training.
- uri str
- The URI of the model version.
- version_
description str - The version descriptions.
- version_
name str - The Model version.
- approval
Status String - The approval status. Valid values:
- Pending: To be determined.
- Approved: Allow to go online.
- Rejected: Online is not allowed.
- extra
Info Map<String> - Other information.
- format
Type String - The format of the model. Valid values:
- OfflineModel
- SavedModel
- Keras H5
- Frozen Pb
- Caffe Prototxt
- TorchScript
- XGBoost
- PMML
- AlinkModel
- ONNX
- framework
Type String - The framework of the model. Valid values:
- Pytorch
- XGBoost
- Keras
- Caffe
- Alink
- Xflow
- TensorFlow
- inference
Spec Map<String> - Describes how to apply to downstream inference services.
- labels List<Property Map>
- List of model version labels. See
labels
below. - metrics Map<String>
- The metrics for the model. The serialized length is limited to 8192.
- model
Id String - The model ID.
- options String
- The extended field. This is a JSON string.
- source
Id String - The source ID.
- source
Type String - The type of the model source. Valid values:
- Custom: Custom.
- PAIFlow:PAI workflow.
- TrainingService:PAI training service.
- training
Spec Map<String> - The training configurations. Used for fine-tuning and incremental training.
- uri String
- The URI of the model version.
- version
Description String - The version descriptions.
- version
Name String - The Model version.
Supporting Types
WorkspaceModelVersionLabel, WorkspaceModelVersionLabelArgs
Import
PAI Workspace Model Version can be imported using the id, e.g.
$ pulumi import alicloud:pai/workspaceModelVersion:WorkspaceModelVersion example <model_id>:<version_name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.