Roll back a family
Take a family back to to, one of its older models, such as router@2, and discard for
good every newer one, neither deleted nor discarded: each stops answering, its own switch and keep warm
go off, calls to it get 410 model_discarded, and its number is never given again. discard
names exactly those models, as you confirmed: 409 rollback_changed, with what it would
discard and the work it would cancel, when they differ, or when that work started since. A
fine-tune of the family still training is cancelled, and so is an evaluation of a discarded
model. A family that is on loads and probes to first, then serves it, and keep warm
follows; a family that is off serves it once switched on. A rollback is never refused at
the account’s limits: when to would have no place, or a kept-warm family no warm place,
the newer models are still discarded, the family keeps serving its model, and its move
to to waits, as a move does. 409 nothing_to_roll_back when to is the latest model, and
503 warm_capacity when it would leave the engines of its size no slot for models that
aren’t kept warm. The same rollback sent
again, once its models are discarded, returns the family as it is. With served, only
while the family serves the model the caller saw.
curl --request POST \
--url https://console.sqwish.ai/v1/families/{family}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"discard": [
"<string>"
],
"served": "<string>"
}
'import requests
url = "https://console.sqwish.ai/v1/families/{family}/rollback"
payload = {
"to": "<string>",
"discard": ["<string>"],
"served": "<string>"
}
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({to: '<string>', discard: ['<string>'], served: '<string>'})
};
fetch('https://console.sqwish.ai/v1/families/{family}/rollback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "family",
"switched_on": true,
"used_at": 123,
"switches_off_at": 123,
"off_reason": "owner",
"off_at": 123,
"dataset_id": "<string>",
"origin": "<string>",
"created_at": 123,
"served": {
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"on_at": 123,
"keep_warm": true,
"keep_warm_stopped_at": 123,
"used_at": 123,
"switches_off_at": 123,
"off_reason": "owner",
"off_at": 123,
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {},
"discarded_at": 123
},
"latest": {
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"on_at": 123,
"keep_warm": true,
"keep_warm_stopped_at": 123,
"used_at": 123,
"switches_off_at": 123,
"off_reason": "owner",
"off_at": 123,
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {},
"discarded_at": 123
},
"models": [
{
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"on_at": 123,
"keep_warm": true,
"keep_warm_stopped_at": 123,
"used_at": 123,
"switches_off_at": 123,
"off_reason": "owner",
"off_at": 123,
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {},
"discarded_at": 123
}
],
"keep_warm": true,
"keep_warm_window": {
"started_at": 123,
"ends_at": 123,
"reserved_usd": "<string>"
},
"keep_warm_stopped_at": 123,
"move": {
"to": "<string>",
"waiting_for": "place",
"reason": "live_limit"
},
"moved": {
"at": 123,
"from": "<string>"
},
"continue": {
"state": "new_data",
"version": 123,
"added_at": 123,
"added_from": "<string>",
"evaluation_decisions": 123,
"needed": 123,
"rows": {
"new": 123,
"earlier": 123,
"evaluation": 123
},
"price_usd": "<string>"
},
"jobs": [
{
"id": "<string>",
"status": "queued",
"outcome": "joined",
"reason": "<string>",
"dataset_version": 123,
"output_model": "<string>",
"created_at": 123,
"price_usd": "<string>",
"charge": "free"
}
]
}{
"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
The model to go back to, such as router@2: one of the family's models, neither deleted nor discarded.
140The family's models newer than to, neither deleted nor discarded, such as ["router@3", "router@4"], as the caller confirmed discarding them: refused with rollback_changed unless they are exactly those.
500The id of the model the family served when the caller looked: refused unless it still does. Null for none.
140Response
Successful Response
"family"Whether calls to its name are answered.
Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on.
When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model.
Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise.
owner, idle When it went off, with off_reason. Null otherwise.
The dataset it grows on.
Where it started: a base model, or one of your models.
When it was named, as its first fine-tune was queued.
The model calls to its name get while it is switched on, or null for none yet.
Show child attributes
Show child attributes
Its newest model, neither deleted nor discarded.
Show child attributes
Show child attributes
Every model of its line, oldest first. A deleted one shows only where it stood.
- ModelVersion
- DeletedModelVersion
Show child attributes
Show child attributes
The hour of keep warm being billed for the model the family serves, while the family is kept warm. Null otherwise: a model kept warm on its own shows its own hour.
Show child attributes
Show child attributes
When keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null.
The move to its latest model it waits to make, and what it waits for. Null while it serves its latest model, or is switched off.
Show child attributes
Show child attributes
When it last moved by itself to the model it serves, and from which. Null when it never did, or serves another model or was rolled back since.
Show child attributes
Show child attributes
What continuing it would do now, from the family's dataset and jobs. It doesn't check credit, storage allowance or queue room, which the start refuses with insufficient_credit, storage_allowance, queue_full or tenant_queue_full. Null for a family with no dataset. A list of families reads no dataset: there new_data and retry only say a version no finished job used is waiting, and the counts and fee are null. The answers of a switch, keep warm or rollback leave it out.
Show child attributes
Show child attributes
Its fine-tunes, newest first, with how each ended. Lists of families, and the answers of a switch, keep warm or rollback, leave it out.
Show child attributes
Show child attributes
curl --request POST \
--url https://console.sqwish.ai/v1/families/{family}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"discard": [
"<string>"
],
"served": "<string>"
}
'import requests
url = "https://console.sqwish.ai/v1/families/{family}/rollback"
payload = {
"to": "<string>",
"discard": ["<string>"],
"served": "<string>"
}
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({to: '<string>', discard: ['<string>'], served: '<string>'})
};
fetch('https://console.sqwish.ai/v1/families/{family}/rollback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "family",
"switched_on": true,
"used_at": 123,
"switches_off_at": 123,
"off_reason": "owner",
"off_at": 123,
"dataset_id": "<string>",
"origin": "<string>",
"created_at": 123,
"served": {
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"on_at": 123,
"keep_warm": true,
"keep_warm_stopped_at": 123,
"used_at": 123,
"switches_off_at": 123,
"off_reason": "owner",
"off_at": 123,
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {},
"discarded_at": 123
},
"latest": {
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"on_at": 123,
"keep_warm": true,
"keep_warm_stopped_at": 123,
"used_at": 123,
"switches_off_at": 123,
"off_reason": "owner",
"off_at": 123,
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {},
"discarded_at": 123
},
"models": [
{
"version": 123,
"ref": "<string>",
"adapter": "<string>",
"status": "<string>",
"on_at": 123,
"keep_warm": true,
"keep_warm_stopped_at": 123,
"used_at": 123,
"switches_off_at": 123,
"off_reason": "owner",
"off_at": 123,
"state": "loaded",
"parent": "<string>",
"created_at": 123,
"gate": {
"passed": true,
"against": "parent",
"reasons": [
"<string>"
],
"groups": {},
"deltas": {},
"ece": {}
},
"heldout": {},
"discarded_at": 123
}
],
"keep_warm": true,
"keep_warm_window": {
"started_at": 123,
"ends_at": 123,
"reserved_usd": "<string>"
},
"keep_warm_stopped_at": 123,
"move": {
"to": "<string>",
"waiting_for": "place",
"reason": "live_limit"
},
"moved": {
"at": 123,
"from": "<string>"
},
"continue": {
"state": "new_data",
"version": 123,
"added_at": 123,
"added_from": "<string>",
"evaluation_decisions": 123,
"needed": 123,
"rows": {
"new": 123,
"earlier": 123,
"evaluation": 123
},
"price_usd": "<string>"
},
"jobs": [
{
"id": "<string>",
"status": "queued",
"outcome": "joined",
"reason": "<string>",
"dataset_version": 123,
"output_model": "<string>",
"created_at": 123,
"price_usd": "<string>",
"charge": "free"
}
]
}{
"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>"
}
]
}
}