跳到主要内容

在线更新参数


提示

模型部署过程中,如进行在线更新、扩缩容或参数调整,将通过启动新实例来替换旧配置的实例。

更新基模型信息, 自动扩缩容的修改。
PUT
https://api.alayanew.com/api/serverless-infer/v1/deployment/{serviceId}/scale
Authorizations
AuthorizationsStringHeaderRequired

用户可通过已获取Serverless API Key做验证,例如:plain Credential=[YOUR_AK],Signature=[YOUR_SK]。

Path Parameters
serviceIdStringRequired

服务ID。

Query Parameters
scaleObjectRequired

Response
状态码:application/json
codeInt

code是一种常见的返回值形式,表示查询操作的执行结果。

0是成功标识,表示操作成功完成。
dataObject

msgString

code返回值为-1时,返回异常信息。

curl --location --request PUT 'https://api.alayanew.com/api/serverless-infer/v1/deployment/38fbfc3d-6a88-4c35-b8b6-9efc83949d47/scale' 
     --header 'Authorization:plain Credential=YOUR_AK,Signature=YOUR_SK' 
     --header 'Content-Type: application/json' 
        --data '{
            "serviceId": "38fbfc3d-6a88-4c35-b8b6-9efc83949d4",
            "scale": {
                "min": 1,
                "max": 4,
                "rpsValue": 60,
                "idleTime": 300
            }
            } ' 
{
  "code": "0",
  "data": {
  },
  "msg": "string, "
}