Models
Configure learning
Train the next version after after new labelled decisions, and promote it if
auto_promote and it passes the gate. {"enabled": false} turns it off.
POST
/
v1
/
models
/
{name}
/
learning
Configure learning
curl --request POST \
--url https://console.sqwish.ai/v1/models/{name}/learning \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"after": 200,
"auto_promote": false
}
'import requests
url = "https://console.sqwish.ai/v1/models/{name}/learning"
payload = {
"enabled": True,
"after": 200,
"auto_promote": 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({enabled: true, after: 200, auto_promote: false})
};
fetch('https://console.sqwish.ai/v1/models/{name}/learning', 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
Configure learning
curl --request POST \
--url https://console.sqwish.ai/v1/models/{name}/learning \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"after": 200,
"auto_promote": false
}
'import requests
url = "https://console.sqwish.ai/v1/models/{name}/learning"
payload = {
"enabled": True,
"after": 200,
"auto_promote": 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({enabled: true, after: 200, auto_promote: false})
};
fetch('https://console.sqwish.ai/v1/models/{name}/learning', 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>"
}
]
}
}