计算
弹性云服务器 ECS
Flexus云服务
裸金属服务器 BMS
弹性伸缩 AS
镜像服务 IMS
专属主机 DeH
函数工作流 FunctionGraph
云手机服务器 CPH
Huawei Cloud EulerOS
网络
虚拟私有云 VPC
弹性公网IP EIP
虚拟专用网络 VPN
弹性负载均衡 ELB
NAT网关 NAT
云专线 DC
VPC终端节点 VPCEP
云连接 CC
企业路由器 ER
企业交换机 ESW
全球加速 GA
安全与合规
安全技术与应用
Web应用防火墙 WAF
企业主机安全 HSS
云防火墙 CFW
安全云脑 SecMaster
DDoS防护 AAD
数据加密服务 DEW
数据库安全服务 DBSS
云堡垒机 CBH
数据安全中心 DSC
云证书管理服务 CCM
边缘安全 EdgeSec
威胁检测服务 MTD
CDN与智能边缘
内容分发网络 CDN
CloudPond云服务
智能边缘云 IEC
迁移
主机迁移服务 SMS
对象存储迁移服务 OMS
云数据迁移 CDM
迁移中心 MGC
大数据
MapReduce服务 MRS
数据湖探索 DLI
表格存储服务 CloudTable
云搜索服务 CSS
数据接入服务 DIS
数据仓库服务 GaussDB(DWS)
数据治理中心 DataArts Studio
数据可视化 DLV
数据湖工厂 DLF
湖仓构建 LakeFormation
企业应用
云桌面 Workspace
应用与数据集成平台 ROMA Connect
云解析服务 DNS
专属云
专属计算集群 DCC
IoT物联网
IoT物联网
设备接入 IoTDA
智能边缘平台 IEF
用户服务
账号中心
费用中心
成本中心
资源中心
企业管理
工单管理
国际站常见问题
ICP备案
我的凭证
支持计划
客户运营能力
合作伙伴支持计划
专业服务
区块链
区块链服务 BCS
Web3节点引擎服务 NES
解决方案
SAP
高性能计算 HPC
视频
视频直播 Live
视频点播 VOD
媒体处理 MPC
实时音视频 SparkRTC
数字内容生产线 MetaStudio
存储
对象存储服务 OBS
云硬盘 EVS
云备份 CBR
存储容灾服务 SDRS
高性能弹性文件服务 SFS Turbo
弹性文件服务 SFS
云硬盘备份 VBS
云服务器备份 CSBS
数据快递服务 DES
专属分布式存储服务 DSS
容器
云容器引擎 CCE
容器镜像服务 SWR
应用服务网格 ASM
华为云UCS
云容器实例 CCI
管理与监管
云监控服务 CES
统一身份认证服务 IAM
资源编排服务 RFS
云审计服务 CTS
标签管理服务 TMS
云日志服务 LTS
配置审计 Config
资源访问管理 RAM
消息通知服务 SMN
应用运维管理 AOM
应用性能管理 APM
组织 Organizations
优化顾问 OA
IAM 身份中心
云运维中心 COC
资源治理中心 RGC
应用身份管理服务 OneAccess
数据库
云数据库 RDS
文档数据库服务 DDS
数据管理服务 DAS
数据复制服务 DRS
云数据库 GeminiDB
云数据库 GaussDB
分布式数据库中间件 DDM
数据库和应用迁移 UGO
云数据库 TaurusDB
人工智能
人脸识别服务 FRS
图引擎服务 GES
图像识别 Image
内容审核 Moderation
文字识别 OCR
AI开发平台ModelArts
图像搜索 ImageSearch
对话机器人服务 CBS
华为HiLens
视频智能分析服务 VIAS
语音交互服务 SIS
应用中间件
分布式缓存服务 DCS
API网关 APIG
微服务引擎 CSE
分布式消息服务Kafka版
分布式消息服务RabbitMQ版
分布式消息服务RocketMQ版
多活高可用服务 MAS
事件网格 EG
企业协同
华为云会议 Meeting
云通信
消息&短信 MSGSMS
云生态
合作伙伴中心
云商店
开发者工具
SDK开发指南
API签名指南
Terraform
华为云命令行工具服务 KooCLI
其他
产品价格详情
系统权限
管理控制台
客户关联华为云合作伙伴须知
消息中心
公共问题
开发与运维
应用管理与运维平台 ServiceStage
软件开发生产线 CodeArts
需求管理 CodeArts Req
部署 CodeArts Deploy
性能测试 CodeArts PerfTest
编译构建 CodeArts Build
流水线 CodeArts Pipeline
制品仓库 CodeArts Artifact
测试计划 CodeArts TestPlan
代码检查 CodeArts Check
代码托管 CodeArts Repo
云应用引擎 CAE
开天aPaaS
云消息服务 KooMessage
云手机服务 KooPhone
云空间服务 KooDrive

模型配置文件编写说明

更新时间:2024-12-25 GMT+08:00

模型开发者发布模型时需要编写配置文件config.json。模型配置文件描述模型用途、模型计算框架、模型精度、推理代码依赖包以及模型对外API接口。

配置文件格式说明

配置文件为JSON格式,参数说明如表1所示。

表1 参数说明

参数

是否必选

参数类型

描述

model_algorithm

String

模型算法,表示该模型的用途,由模型开发者填写,以便使用者理解该模型的用途。只能以英文字母开头,不能包含中文以及&!'\"<>=,不超过36个字符。常见的模型算法有image_classification(图像分类)、object_detection(物体检测)、predict_analysis(预测分析)等。

model_type

String

模型AI引擎,表明模型使用的计算框架,支持常用AI框架和“Image”

runtime

String

模型运行时环境,系统默认使用python2.7。runtime可选值与model_type相关,当model_type设置为Image时,不需要设置runtime,当model_type设置为其他常用框架时,请选择您使用的引擎所对应的运行时环境。目前支持的运行时环境列表请参见推理支持的AI引擎

需要注意的是,如果您的模型需指定CPU或GPU上运行时,请根据runtime的后缀信息选择,当runtime中未包含cpu或gpu信息时,请仔细阅读“推理支持的AI引擎”中每个runtime的说明信息。

metrics

object数据结构

模型的精度信息,包括平均数、召回率、精确率、准确率,metrics object数据结构说明如表2所示。

结果会显示在模型详情页面的“模型精度”模块。

apis

api数据结构数组

表示模型接收和返回的请求样式,为结构体数据。

即模型可对外提供的Restful API数组,API数据结构如表3所示。示例代码请参见apis参数代码示例

  • “model_type”“Image”时,即自定义镜像的模型场景,“apis”可根据镜像实际对外暴露的请求路径在“apis”中声明不同路径的API。
  • “model_type”不为“Image”时,“apis”只能声明一个请求路径为“/”的API,因为系统预置的AI引擎仅暴露一个请求路径为“/”的推理接口。

dependencies

dependency结构数组

表示模型推理代码需要依赖的包,为结构体数据。

模型开发者需要提供包名、安装方式、版本约束。目前只支持pip安装方式。dependency结构数组说明如表6所示。

如果模型包内没有推理代码customize_service.py文件,则该字段可不填。自定义镜像模型不支持安装依赖包。

说明:

“dependencies”参数支持多个“dependency”结构数组,以list格式填入,默认安装包存在先后依赖关系(即写在前面的先安装,写在后面的后安装),且支持线下wheel包安装(wheel包必须与模型文件放在同一目录)。示例请参考导入模型时安装包依赖配置文件如何书写?

health

health数据结构

镜像健康接口配置信息,只有“model_type”“Image”时才需填写。

如果在滚动升级时要求不中断业务,那么必须提供健康检查的接口供ModelArts调用。health数据结构如表8所示。

表2 metrics object数据结构说明

参数

是否必选

参数类型

描述

f1

Number

平均数。精确到小数点后17位,超过17位时,取前17位数值。

recall

Number

召回率。精确到小数点后17位,超过17位时,取前17位数值。

precision

Number

精确率。精确到小数点后17位,超过17位时,取前17位数值。

accuracy

Number

准确率。精确到小数点后17位,超过17位时,取前17位数值。

表3 api数据结构说明

参数

是否必选

参数类型

描述

url

String

请求路径。默认值为“/”。自定义镜像的模型(即model_type为Image时)需要根据镜像内实际暴露的请求路径填写“url”。非自定义镜像模型(即model_type不为Image时)时,“url”只能为“/”

method

String

请求方法。默认值为“POST”

request

Object

请求体,request结构说明如表4所示。

response

Object

响应体,response结构说明如表5所示。

表4 request结构说明

参数

是否必选

参数类型

描述

Content-type

在线服务-非必选

批量服务-必选

String

data以指定内容类型发送。默认值为“application/json”

一般情况包括如下两种内容类型:

  • “application/json”,发送json数据。
  • “multipart/form-data”,上传文件。
说明:

针对机器学习类模型,仅支持“application/json”

data

在线服务-非必选

批量服务-必选

String

请求体以json schema描述。参数说明请参考官方指导

表5 response结构说明

参数

是否必选

参数类型

描述

Content-type

在线服务-非必选

批量服务-必选

String

data以指定内容类型发送。默认值为“application/json”

说明:

针对机器学习类模型,仅支持“application/json”

data

在线服务-非必选

批量服务-必选

String

响应体以json schema描述。参数说明请参考官方指导

表6 dependency结构数组说明

参数

是否必选

参数类型

描述

installer

String

安装方式,当前只支持“pip”

packages

package结构数组

依赖包集合,package结构数组说明如表7所示。

表7 package结构数组说明

参数

是否必选

参数类型

描述

package_name

String

依赖包名称。不能含有中文及特殊字符&!'"<>=。

package_version

String

依赖包版本,如果不强依赖于版本号,则该项不填。不能含有中文及特殊字符&!'"<>=。

restraint

String

版本限制条件,当且仅当“package_version”存在时必填,可选“EXACT/ATLEAST/ATMOST”

  • “EXACT”表示安装给定版本。
  • “ATLEAST”表示安装版本不小于给定版本。
  • “ATMOST”表示安装包版本不大于给定版本。
    说明:
    • 如果对版本有明确要求,优先使用“EXACT”;如果使用“EXACT”与系统安装包有冲突,可以选择“ATLEAST”
    • 如果对版本没有明确要求,推荐不填写“restraint”“package_version”,只保留“package_name”参数
表8 health数据结构说明

参数

是否必选

参数类型

描述

check_method

String

健康检查方式。可选“HTTP/EXEC”。

  • HTTP:HTTP请求检查
  • EXEC:执行命令检查。

command

String

健康检查命令。健康检查方式为EXEC时必选。

url

String

健康检查接口请求路径。健康检查方式为HTTP时必选。

protocol

String

健康检查接口请求协议,默认为http。健康检查方式为HTTP时必选。

initial_delay_seconds

String

健康检查初始化延迟时间。

timeout_seconds

String

健康检查超时时间。

period_seconds

String

健康检查周期。填写大于0且小于等于2147483647的整数,单位为秒。

failure_threshold

String

健康检查最大失败次数。填写大于0且小于等于2147483647的整数。

apis参数代码示例

[{
    "url": "/",
    "method": "post",
    "request": {
        "Content-type": "multipart/form-data",
        "data": {
            "type": "object",
            "properties": {
                "images": {
                    "type": "file"
                }
            }
        }
    },
    "response": {
        "Content-type": "applicaton/json",
        "data": {
            "type": "object",
            "properties": {
                "mnist_result": {
                    "type": "array",
                    "item": [
                        {
                            "type": "string"
                        }
                    ]
                }
            }
        }
    }
}]

目标检测模型配置文件示例

如下代码以TensorFlow引擎为例,您可以根据实际使用的引擎类型修改model_type参数后使用。

  • 模型输入

    key:images

    value:图片文件

  • 模型输出
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    {
        "detection_classes": [
            "face",
            "arm"
        ],
        "detection_boxes": [
            [
                33.6,
                42.6,
                104.5,
                203.4
            ],
            [
                103.1,
                92.8,
                765.6,
                945.7
            ]
        ],
        "detection_scores": [0.99, 0.73]
    }
    
  • 配置文件
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    {
        "model_type": "TensorFlow",
        "model_algorithm": "object_detection",
        "metrics": {
            "f1": 0.345294,
            "accuracy": 0.462963,
            "precision": 0.338977,
            "recall": 0.351852
        },
        "apis": [{
            "url": "/",
            "method": "post",
            "request": {
                "Content-type": "multipart/form-data",
                "data": {
                    "type": "object",
                    "properties": {
                        "images": {
                            "type": "file"
                        }
                    }
                }
            },
            "response": {
                "Content-type": "application/json",
                "data": {
                    "type": "object",
                    "properties": {
                        "detection_classes": {
                            "type": "array",
                            "items": [{
                                "type": "string"
                            }]
                        },
                        "detection_boxes": {
                            "type": "array",
                            "items": [{
                                "type": "array",
                                "minItems": 4,
                                "maxItems": 4,
                                "items": [{
                                    "type": "number"
                                }]
                            }]
                        },
                        "detection_scores": {
                            "type": "array",
                            "items": [{
                                "type": "number"
                            }]
                        }
                    }
                }
            }
        }],
        "dependencies": [{
            "installer": "pip",
            "packages": [{
                    "restraint": "EXACT",
                    "package_version": "1.15.0",
                    "package_name": "numpy"
                },
                {
                    "restraint": "EXACT",
                    "package_version": "5.2.0",
                    "package_name": "Pillow"
                }
            ]
        }]
    }
    

图像分类模型配置文件示例

如下代码以TensorFlow引擎为例,您可以根据实际使用的引擎类型修改model_type参数后使用。

  • 模型输入

    key:images

    value:图片文件

  • 模型输出
    1
    2
    3
    4
    5
    6
    7
    {
        "predicted_label": "flower",
        "scores": [
           ["rose", 0.99],
           ["begonia", 0.01]
        ]
    }
    
  • 配置文件
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    {
        "model_type": "TensorFlow",
        "model_algorithm": "image_classification",
        "metrics": {
            "f1": 0.345294,
            "accuracy": 0.462963,
            "precision": 0.338977,
            "recall": 0.351852
        },
        "apis": [{
            "url": "/",
            "method": "post",
            "request": {
                "Content-type": "multipart/form-data",
                "data": {
                    "type": "object",
                    "properties": {
                        "images": {
                            "type": "file"
                        }
                    }
                }
            },
            "response": {
                "Content-type": "application/json",
                "data": {
                    "type": "object",
                    "properties": {
                        "predicted_label": {
                            "type": "string"
                        },
                        "scores": {
                            "type": "array",
                            "items": [{
                                "type": "array",
                                "minItems": 2,
                                "maxItems": 2,
                                "items": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "number"
                                    }
                                ]
                            }]
                        }
                    }
                }
            }
        }],
        "dependencies": [{
            "installer": "pip",
            "packages": [{
                    "restraint": "ATLEAST",
                    "package_version": "1.15.0",
                    "package_name": "numpy"
                },
                {
                    "restraint": "",
                    "package_version": "",
                    "package_name": "Pillow"
                }
            ]
        }]
    }
    

如下代码以MindSpore引擎为例,您可以根据实际使用的引擎类型修改model_type参数后使用。

  • 模型输入

    key:images

    value:图片文件

  • 模型输出
    1
    "[[-2.404526   -3.0476532  -1.9888215   0.45013925 -1.7018927   0.40332815\n  -7.1861157  11.290332   -1.5861531   5.7887416 ]]"
    
  • 配置文件
    {
         "model_algorithm": "image_classification",
         "model_type": "MindSpore",
         "metrics": {
             "f1": 0.124555,
             "recall": 0.171875,
             "precision": 0.0023493892851938493,
             "accuracy": 0.00746268656716417
         },
         "apis": [{
                 "url": "/",
                 "method": "post",
                 "request": {
                     "Content-type": "multipart/form-data",
                     "data": {
                         "type": "object",
                         "properties": {
                             "images": {
                                 "type": "file"
                             }
                         }
                     }
                 },
                 "response": {
                     "Content-type": "applicaton/json",
                     "data": {
                         "type": "object",
                         "properties": {
                             "mnist_result": {
                                 "type": "array",
                                 "item": [{
                                     "type": "string"
                                 }]
                             }
                         }
                     }
                 }
             }
         ],
        "dependencies": []
     }

预测分析模型配置文件示例

如下代码以TensorFlow引擎为例,您可以根据实际使用的引擎类型修改model_type参数后使用。

  • 模型输入
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    {
        "data": {
            "req_data": [
                {
                    "buying_price": "high",
                    "maint_price": "high",
                    "doors": "2",
                    "persons": "2",
                    "lug_boot": "small",
                    "safety": "low",
                    "acceptability": "acc"
                },
                {
                    "buying_price": "high",
                    "maint_price": "high",
                    "doors": "2",
                    "persons": "2",
                    "lug_boot": "small",
                    "safety": "low",
                    "acceptability": "acc"
                }
            ]
        }
    }
    
  • 模型输出
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    {
        "data": {
            "resp_data": [
                {
                    "predict_result": "unacc"
                },
                {
                    "predict_result": "unacc"
                }
            ]
        }
    }
    
  • 配置文件
    说明:

    代码中request结构和response结构中的data参数是json schema数据结构。data/properties里面的内容对应“模型输入”“模型输出”

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    {
        "model_type": "TensorFlow",
        "model_algorithm": "predict_analysis",
        "metrics": {
            "f1": 0.345294,
            "accuracy": 0.462963,
            "precision": 0.338977,
            "recall": 0.351852
        },
        "apis": [
            {
                "url": "/",
                "method": "post",
                "request": {
                    "Content-type": "application/json",
                    "data": {
                        "type": "object",
                        "properties": {
                            "data": {
                                "type": "object",
                                "properties": {
                                    "req_data": {
                                        "items": [
                                            {
                                                "type": "object",
                                                "properties": {}
                                            }
                                        ],
                                        "type": "array"
                                    }
                                }
                            }
                        }
                    }
                },
                "response": {
                    "Content-type": "application/json",
                    "data": {
                        "type": "object",
                        "properties": {
                            "data": {
                                "type": "object",
                                "properties": {
                                    "resp_data": {
                                        "type": "array",
                                        "items": [
                                            {
                                                "type": "object",
                                                "properties": {}
                                            }
                                        ]
                                    }
                                }
                           }
                        }
                    }
                }
            }
        ],
        "dependencies": [
            {
                "installer": "pip",
                "packages": [
                    {
                        "restraint": "EXACT",
                        "package_version": "1.15.0",
                        "package_name": "numpy"
                    },
                    {
                        "restraint": "EXACT",
                        "package_version": "5.2.0",
                        "package_name": "Pillow"
                    }
                ]
            }
        ]
    }
    

自定义镜像类型的模型配置文件示例

模型输入和输出与目标检测模型配置文件示例类似。

  • 模型预测输入为图片类型时,request请求示例如下:

    该示例表示模型预测接收一个参数名为images、参数类型为file的预测请求,在推理界面会显示文件上传按钮,以文件形式进行预测。

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    {
        "Content-type": "multipart/form-data",
        "data": {
            "type": "object",
            "properties": {
                "images": {
                    "type": "file"
                }
            }
        }
    }
    
  • 模型预测输入为json数据类型时,request请求示例如下:

    该示例表示模型预测接收json请求体,只有一个参数名为input、参数类型为string的预测请求,在推理界面会显示文本输入框,用于填写预测请求。

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    {
        "Content-type": "application/json",
        "data": {
            "type": "object",
            "properties": {
                "input": {
                    "type": "string"
                }
            }
        }
    }
    

完整请求示例如下:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
    "model_algorithm": "image_classification",
    "model_type": "Image",
    "metrics": {
        "f1": 0.345294,
        "accuracy": 0.462963,
        "precision": 0.338977,
        "recall": 0.351852
    },
    "apis": [{
        "url": "/",
        "method": "post",
        "request": {
            "Content-type": "multipart/form-data",
            "data": {
                "type": "object",
                "properties": {
                    "images": {
                        "type": "file"
                    }
                }
            }
        },
        "response": {
            "Content-type": "application/json",
            "data": {
                "type": "object",
                "required": [
                    "predicted_label",
                    "scores"
                ],
                "properties": {
                    "predicted_label": {
                        "type": "string"
                    },
                    "scores": {
                        "type": "array",
                        "items": [{
                            "type": "array",
                            "minItems": 2,
                            "maxItems": 2,
                            "items": [{
                                    "type": "string"
                                },
                                {
                                    "type": "number"
                                }
                            ]
                        }]
                    }
                }
            }
        }
    }]
}

机器学习类型的模型配置文件示例

以下代码以XGBoost为例。

  • 模型输入:
{
    "req_data": [
        {
            "sepal_length": 5,
            "sepal_width": 3.3,
            "petal_length": 1.4,
            "petal_width": 0.2
        },
        {
            "sepal_length": 5,
            "sepal_width": 2,
            "petal_length": 3.5,
            "petal_width": 1
        },
        {
            "sepal_length": 6,
            "sepal_width": 2.2,
            "petal_length": 5,
            "petal_width": 1.5
        }
    ]
}
  • 模型输出:
{
    "resp_data": [
        {
            "predict_result": "Iris-setosa"
        },
        {
            "predict_result": "Iris-versicolor"
        }
    ]
}
  • 配置文件:
{
    "model_type": "XGBoost",
    "model_algorithm": "xgboost_iris_test",
    "runtime": "python2.7",
    "metrics": {
        "f1": 0.345294,
        "accuracy": 0.462963,
        "precision": 0.338977,
        "recall": 0.351852
    },
    "apis": [
        {
            "url": "/",
            "method": "post",
            "request": {
                "Content-type": "application/json",
                "data": {
                    "type": "object",
                    "properties": {
                        "req_data": {
                            "items": [
                                {
                                    "type": "object",
                                    "properties": {}
                                }
                            ],
                            "type": "array"
                        }
                    }
                }
            },
            "response": {
                "Content-type": "applicaton/json",
                "data": {
                    "type": "object",
                    "properties": {
                        "resp_data": {
                            "type": "array",
                            "items": [
                                {
                                    "type": "object",
                                    "properties": {
                                        "predict_result": {}
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        }
    ]
}

使用自定义依赖包的模型配置文件示例

如下示例中,定义了1.16.4版本的numpy的依赖环境。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
    "model_algorithm": "image_classification",
    "model_type": "TensorFlow",
    "runtime": "python3.6",
    "apis": [
        {
            "url": "/",
            "method": "post",
            "request": {
                "Content-type": "multipart/form-data",
                "data": {
                    "type": "object",
                    "properties": {
                        "images": {
                            "type": "file"
                        }
                    }
                }
            },
            "response": {
                "Content-type": "applicaton/json",
                "data": {
                    "type": "object",
                    "properties": {
                        "mnist_result": {
                            "type": "array",
                            "item": [
                                {
                                    "type": "string"
                                }
                            ]
                        }
                    }
                }
            }
        }
    ],
    "metrics": {
        "f1": 0.124555,
        "recall": 0.171875,
        "precision": 0.00234938928519385,
        "accuracy": 0.00746268656716417
    },
    "dependencies": [
        {
            "installer": "pip",
            "packages": [
                {
                    "restraint": "EXACT",
                    "package_version": "1.16.4",
                    "package_name": "numpy"
                }
            ]
        }
    ]
}

我们使用cookie来确保您的高速浏览体验。继续浏览本站,即表示您同意我们使用cookie。 详情

文档反馈

文档反馈

意见反馈

0/500

标记内容

同时提交标记内容