Create and provision the session's one training run.
curl --request POST \
--url http://localhost:3001/v1/training/sessions/{session_id}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "<string>",
"base_model": "<string>",
"model_revision": "<string>",
"tuning_mode": "lora",
"lora": {
"rank": 32,
"seed": 4611686018427388000,
"train_mlp": true,
"train_attn": true,
"train_unembed": true
},
"checkpoint_id": "<string>",
"metadata": {}
}
'import requests
url = "http://localhost:3001/v1/training/sessions/{session_id}/runs"
payload = {
"request_id": "<string>",
"base_model": "<string>",
"model_revision": "<string>",
"tuning_mode": "lora",
"lora": {
"rank": 32,
"seed": 4611686018427388000,
"train_mlp": True,
"train_attn": True,
"train_unembed": True
},
"checkpoint_id": "<string>",
"metadata": {}
}
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({
request_id: '<string>',
base_model: '<string>',
model_revision: '<string>',
tuning_mode: 'lora',
lora: {
rank: 32,
seed: 4611686018427388000,
train_mlp: true,
train_attn: true,
train_unembed: true
},
checkpoint_id: '<string>',
metadata: {}
})
};
fetch('http://localhost:3001/v1/training/sessions/{session_id}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"session_id": "<string>",
"status": "created",
"base_model": "<string>",
"model_revision": "<string>",
"resource_profile": "<string>",
"tuning_mode": "lora",
"checkpoint_id": "<string>",
"next_seq_id": 2,
"sampler_id": "<string>",
"latest_weight_version": 1,
"error_code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"request_id": "<string>",
"funding_source": "platform"
}unified-training
Create and provision the session's one training run.
A v1 session owns exactly one run. Model admission is constrained by the session provider’s capability row. Modal model revisions must equal Whitney’s catalog commit; Tinker model identity is provider-managed.
POST
/
v1
/
training
/
sessions
/
{session_id}
/
runs
Create and provision the session's one training run.
curl --request POST \
--url http://localhost:3001/v1/training/sessions/{session_id}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "<string>",
"base_model": "<string>",
"model_revision": "<string>",
"tuning_mode": "lora",
"lora": {
"rank": 32,
"seed": 4611686018427388000,
"train_mlp": true,
"train_attn": true,
"train_unembed": true
},
"checkpoint_id": "<string>",
"metadata": {}
}
'import requests
url = "http://localhost:3001/v1/training/sessions/{session_id}/runs"
payload = {
"request_id": "<string>",
"base_model": "<string>",
"model_revision": "<string>",
"tuning_mode": "lora",
"lora": {
"rank": 32,
"seed": 4611686018427388000,
"train_mlp": True,
"train_attn": True,
"train_unembed": True
},
"checkpoint_id": "<string>",
"metadata": {}
}
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({
request_id: '<string>',
base_model: '<string>',
model_revision: '<string>',
tuning_mode: 'lora',
lora: {
rank: 32,
seed: 4611686018427388000,
train_mlp: true,
train_attn: true,
train_unembed: true
},
checkpoint_id: '<string>',
metadata: {}
})
};
fetch('http://localhost:3001/v1/training/sessions/{session_id}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"session_id": "<string>",
"status": "created",
"base_model": "<string>",
"model_revision": "<string>",
"resource_profile": "<string>",
"tuning_mode": "lora",
"checkpoint_id": "<string>",
"next_seq_id": 2,
"sampler_id": "<string>",
"latest_weight_version": 1,
"error_code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"request_id": "<string>",
"funding_source": "platform"
}Authorizations
Whitney-issued API key. No organization-selection header is accepted.
Path Parameters
Pattern:
^wts_[0-9a-f]{32}$Body
application/json
Full tuning with a LoRA configuration is invalid. Current qualified v1 capability rows only admit LoRA.
Required string length:
1 - 200Required string length:
1 - 256Required string length:
7 - 128Available options:
lora, full At least one train_* field must be true.
Show child attributes
Show child attributes
Pattern:
^wtc_[0-9a-f]{32}$Show child attributes
Show child attributes
Response
The run was created or an idempotent equivalent was returned.
Pattern:
^wtr_[0-9a-f]{32}$Pattern:
^wts_[0-9a-f]{32}$Available options:
created, running, poisoned, finishing, finished, cancel_requested, cancelled, failed, interrupted, timed_out Available options:
lora, full Pattern:
^wtc_[0-9a-f]{32}$Required range:
x >= 1Pattern:
^wtsm_[0-9a-f]{32}$Required range:
x >= 0