Models
Promote model version
Make a version the production version of a named model.
POST
/
v1
/
models
/
{name}
/
promote
Promote model version
curl --request POST \
--url https://console.sqwish.ai/v1/models/{name}/promote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": "candidate",
"force": false
}
'import requests
url = "https://console.sqwish.ai/v1/models/{name}/promote"
payload = {
"version": "candidate",
"force": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 'candidate', force: false})
};
fetch('https://console.sqwish.ai/v1/models/{name}/promote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "model",
"kind": "named",
"production": {
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {}
},
"candidate": {
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {}
},
"previous": {
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {}
},
"keep_warm": true,
"learning": {
"enabled": true,
"after": 123,
"auto_promote": true,
"labelled": 123,
"waiting": "<string>",
"next_round_after": 123,
"round": {
"job": "<string>",
"version": 123,
"state": "<string>",
"started_at": 123,
"message": "<string>"
}
},
"versions": [
{
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {}
}
],
"memory": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Authorizations
Create an API key in the console. Required when accounts are enabled.
Path Parameters
Body
application/json
Response
Successful Response
Allowed value:
"model"Allowed value:
"named"Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Promote model version
curl --request POST \
--url https://console.sqwish.ai/v1/models/{name}/promote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": "candidate",
"force": false
}
'import requests
url = "https://console.sqwish.ai/v1/models/{name}/promote"
payload = {
"version": "candidate",
"force": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 'candidate', force: false})
};
fetch('https://console.sqwish.ai/v1/models/{name}/promote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "model",
"kind": "named",
"production": {
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {}
},
"candidate": {
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {}
},
"previous": {
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {}
},
"keep_warm": true,
"learning": {
"enabled": true,
"after": 123,
"auto_promote": true,
"labelled": 123,
"waiting": "<string>",
"next_round_after": 123,
"round": {
"job": "<string>",
"version": 123,
"state": "<string>",
"started_at": 123,
"message": "<string>"
}
},
"versions": [
{
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {}
}
],
"memory": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}