CreateModelVersion
Adds a new version to a specified model.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paimodel:CreateModelVersion |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v1/models/{ModelId}/versions HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ModelId |
string |
Yes |
The model ID. For more information about how to obtain the model ID, see ListModels. |
model-dfs1****5c |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| VersionName |
string |
No |
The model version. The version must be unique within the model. If you do not specify this parameter, the first version defaults to 0.1.0. The minor version number is then incremented by 1 for each subsequent version. For example, the second version defaults to 0.2.0. A version number consists of a major version, a minor version, and a patch version, separated by periods (.). The major and minor versions are numbers. The patch version can start with a number and contain underscores (_) and letters. Examples: 1.1.0 and 2.3.4_beta. |
0.1.0 |
| Uri |
string |
Yes |
The URI of the model version, which is the storage location of the model. The following types of model URIs are supported:
|
oss://mybucket.oss-cn-beijing.aliyuncs.com/mypath/ |
| Labels |
array |
No |
The list of labels. |
|
| Label |
No |
A label. |
||
| VersionDescription |
string |
No |
The description of the model version. |
情感分析。 |
| FormatType |
string |
No |
The format of the model. Valid values:
Valid values:
|
SavedModel |
| FrameworkType |
string |
No |
The framework of the model. Valid values:
Valid values:
|
TensorFlow |
| Options |
string |
No |
The extended fields. This parameter is a JSON string. |
{} |
| Metrics |
object |
No |
The model metrics. The serialized data cannot exceed 8,192 bytes in length. |
{ "Results": [{ "Dataset": { "DatasetId": "d-sdkjanksaklerhfd" }, "Metrics": { "cer": 0.175 } }, { "Dataset": { "Uri": "oss://xxxx/" }, "Metrics": { "cer": 0.172 } }] } |
| TrainingSpec |
object |
No |
The training configurations. These configurations are used for fine-tuning and incremental training. |
{} |
| InferenceSpec |
object |
No |
The configurations for downstream inference services, such as the processor and container for Elastic Algorithm Service (EAS). Example:
|
{ "processor": "tensorflow_gpu_1.12" } |
| SourceType |
string |
No |
The source type of the model. Valid values:
Valid values:
|
PAIFlow |
| SourceId |
string |
No |
The source ID.
The fields are described as follows:
|
region=cn-shanghai,workspaceId=13**,kind=PipelineRun,id=run-sakdb****jdf |
| ApprovalStatus |
string |
No |
The approval status. Valid values:
|
Approved |
| EvaluationSpec |
object |
No |
The evaluation configurations. |
{} |
| CompressionSpec |
object |
No |
The compression configurations. |
{} |
| ExtraInfo |
object |
No |
Other information. |
{ "CoverUris": ["https://e***u.oss-cn-hangzhou.aliyuncs.com/st****017.preview.png"], "TrainedWords": ["albedo_overlord"] } |
| DistillationSpec |
object |
No |
The distillation configurations. |
{} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
The request ID. |
21645FCD-BAB9-5742-89AE-AEB27****B2E |
| VersionName |
string |
The model version. |
0.1.0 |
Examples
Success response
JSON format
{
"RequestId": "21645FCD-BAB9-5742-89AE-AEB27****B2E",
"VersionName": "0.1.0"
}
Error codes
See for a complete list.
Release notes
See Release Notes for a complete list.