R L

Create training session

POST
/rl/training-sessions

Creates a training session and returns its details.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

resume_from_checkpoint_id?string

Checkpoint ID to resume from. LoRA training checkpoints may resume on another model resource with compatible base-model weights. Full-weight training checkpoints require the original base model.

resume_from_hf_checkpoint?string

HuggingFace repo (or hf://) to resume model weights from. Accepts either a full model or a PEFT adapter directory. Mutually exclusive with resume_from_checkpoint_id.

lora_config?

LoRA adapter configuration for the session

model_resources_id*string

ID of the model resource to use for this training session.

display_name?string

Optional display name used to identify the training session

Lengthlength <= 128
metadata?

Optional auxiliary metadata to associate with the training session

load_optimizer?boolean

Whether to restore optimizer state and step from a training checkpoint. Omitted or true restores them; false loads weights only with a fresh optimizer and step 0. Not valid for inference or HuggingFace checkpoints, which have no optimizer state.

Response Body

application/json

application/json

curl -X POST "https://example.com/rl/training-sessions" \  -H "Content-Type: application/json" \  -d '{    "model_resources_id": "string"  }'
{  "id": "string",  "display_name": "string",  "metadata": {    "wandb": {      "entity": "string",      "project": "string",      "group": "string",      "run_name": "string",      "run_id": "string",      "url": "string"    }  },  "status": "TRAINING_SESSION_STATUS_UNSPECIFIED",  "error": {    "code": "TRAINING_SESSION_ERROR_CODE_RESOURCE_UNAVAILABLE",    "message": "string",    "occurred_at": "2019-08-24T14:15:22Z"  },  "inference_checkpoints": [    {      "id": "string",      "step": "string",      "created_at": "2019-08-24T14:15:22Z",      "registration": {        "model_name": "string",        "registered_at": "2019-08-24T14:15:22Z",        "model_object_id": "string",        "model_object_revision_id": "string",        "adapter_object_id": "string",        "adapter_object_revision_id": "string"      }    }  ],  "training_checkpoints": [    {      "id": "string",      "step": "string",      "created_at": "2019-08-24T14:15:22Z",      "registration": {        "object_id": "string",        "object_revision_id": "string"      }    }  ],  "resume_from_checkpoint_id": "string",  "step": "0",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "lora_config": {    "rank": 32,    "alpha": 64,    "dropout": 0,    "seed": "string",    "train_unembed": true  },  "model_resources_id": "string",  "base_model": "string",  "created_by": "string",  "policy_state": {    "trainer_step": "string",    "target_weights_version": "string",    "applied_weights_version": "string",    "pending_publish": true  }}