Models
Roll back model
Swap a named model’s production version with its previous version.
POST
/
v1
/
models
/
{name}
/
rollback
Roll back model
curl --request POST \
--url https://console.sqwish.ai/v1/models/{name}/rollback \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.sqwish.ai/v1/models/{name}/rollback"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.sqwish.ai/v1/models/{name}/rollback', 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
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
Roll back model
curl --request POST \
--url https://console.sqwish.ai/v1/models/{name}/rollback \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.sqwish.ai/v1/models/{name}/rollback"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.sqwish.ai/v1/models/{name}/rollback', 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>"
}
]
}
}