EAS Quick Start使用教程
通过PAI-EAS,可以将模型快速部署为RESTful1API,再通过HTTPx请求的方式
调用该服务。下面概述通过eascmd命令行方式进行部署。
1、模型服务信息
先训练模型文件
2、下载并认证eas-cmd客户端
下载并认证客户端-机器学习PAI-阿里云
在相对目录文件夹下进入cmd
输入
eascmdwin64 confifig -i (AccessKeyId) -k (AccessKeySecret)
出现如下即为成功
3、模型部署
1、创建demo1.json 文本配置
{ "name": "test_xml_model_xb", "generate_token": "true", "model_path": "https://*****.oss-cn-shanghai.aliyuncs.com/pai/pai*****_model.xml", "processor": "pmml", "metadata": { "instance": 1, "cpu": 1 } }
model_path 为模型保存至 oss 的详情路径。
2、创建服务 - 将部署模型到EAS
eascmdwin64 create demo1.json,
3、在线调试
[ { "sex":1.0,"address":1.0,"famsize":0.0,"pstatus":0.0," - medu":1.0,"mjob":0.0,"fjob":1.0,"guardian":0.0,"traveltime":0.333333333333,"studytime":0.333333333333,"failures":0.0,"schoolsu p":1.0,"paid":0.0,"activties":0.0,"higher":1.0,"internet":0.0,"famrel":0.0,"freetime":0.5,"goout":0.75,"dalc":0.0,"walc":0.0,"health":0.5, "absences":0.08,"finalscore":0.0}]