获取模型版本列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求语法
GET /api/v1/models/{ModelId}/versions
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
PageNumber | integer | 否 | 模型版本列表的页码。起始值为 1,默认为 1。 | 1 |
PageSize | integer | 否 | 分页查询时设置的每页行数。默认为 10。 | 10 |
Order | string | 否 | 分页查询时,对指定的排序字段进行升序或降序。默认 ASC。
| DESC |
SortBy | string | 否 | 分页查询时的排序字段。目前 GmtCreateTime 字段用于排序。 | GmtCreateTime |
VersionName | string | 否 | 配置模型版本名称,来过滤模型版本列表。 | 1.0.1 |
FormatType | string | 否 | 配置模型格式,来过滤模型版本列表。取值如下:
| SavedModel |
FrameworkType | string | 否 | 配置模型框架,来过滤模型版本列表,取值如下:
| TensorFlow |
ModelId | string | 是 | 模型 ID。如何获取模型 ID,请参见 ListModels 。 | model-dajbueh****** |
SourceType | string | 否 | 根据模型来源类型,来过滤模型版本列表。取值如下:
| PAIFlow |
SourceId | string | 否 | 来源 ID。
其中:
| region=cn-shanghai,workspaceId=13**,kind=PipelineRun,id=run-sakdb****jdf |
Label | string | 否 | 标签串。用于列表过滤,标签中 Key 或 Value 中,有指定字符串的,都会被过滤出来。 | key1 |
ApprovalStatus | string | 否 | 根据准入状态来过滤模型版本列表,取值如下:
| Approved |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC***3C83E",
"Versions": [
{
"VersionName": "0.1.0",
"GmtCreateTime": "2021-01-21T17:12:35Z",
"GmtModifiedTime": "2021-01-21T17:12:35Z",
"UserId": "155770209******",
"OwnerId": "155770209******",
"Uri": "oss://mybucket.oss-cn-beijing.aliyuncs.com/mypath/",
"VersionDescription": "情感分析。",
"Labels": [
{
"Key": "env",
"Value": "test"
}
],
"FormatType": "SavedModel",
"FrameworkType": "TensorFlow",
"Options": "{}",
"Metrics": {
"Results": [
{
"Dataset": {
"DatasetId": "d-sdkjanksaklerhfd"
},
"Metrics": {
"cer": 0.175
}
},
{
"Dataset": {
"Uri": "oss://xxxx/"
},
"Metrics": {
"cer": 0.172
}
}
]
},
"TrainingSpec": {},
"InferenceSpec": {
"processor": "tensorflow_gpu_1.12"
},
"EvaluationSpec": {
"test": "test",
"test2": 1
},
"SourceType": "PAIFlow",
"SourceId": "region=cn-shanghai,workspaceId=13**,kind=PipelineRun,id=run-sakdb****jdf",
"ApprovalStatus": "Approved",
"ExtraInfo": {
"CoverUris": [
"https://e***u.oss-cn-hangzhou.aliyuncs.com/st****017.preview.png"
],
"TrainedWords": [
"albedo_overlord"
]
}
}
],
"TotalCount": 15
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||
---|---|---|---|---|
2023-10-16 | API 内部配置变更,不影响调用 | 看变更集 | ||
|