Skip to main content
POST
Submit a managed encoder plan
POST /v1/training/jobs/{job_id}/managed-plan Runs a whole GLiNER2 training plan on an interactive encoder job in one call. The GLiNER2 library’s ManagedTrainingPlan writes the plan: the training and evaluation examples, the exact batch schedule, the evaluation settings, and a fingerprint of the plan’s contents. The response is a future. Read its status, and the selected and continuation checkpoints once it finishes, from GET /v1/training/jobs/{job_id}/futures/{future_id}.
  • Fastino’s hosted API doesn’t offer interactive encoder jobs, so managed plans don’t run there. To train a GLiNER model on the hosted API, use POST /v1/training/jobs with a dataset.
  • Where interactive encoder jobs are offered, send the plan to a fresh encoder job created with POST /v1/training/jobs/create-model, an encoder base model and encoder_config. The plan must match the job’s encoder and LoRA settings, which can’t change.
  • One plan owns the job until the plan finishes or the job stops. Other interactive operations on the job are refused meanwhile.
  • Sending the same plan again returns the same future. Sending a different plan to the same job returns 409.
  • A plan can be at most 8 MiB.
  • This route doesn’t convert a training job created from datasets.

Request

string
required
Your Fastino API key.
string
required
Interactive encoder job ID.
integer
required
Plan format version. Always 1.
string
required
SHA-256 of the plan’s contents, as 64 lowercase hexadecimal characters. The GLiNER2 library computes it. A plan whose contents don’t match its fingerprint is rejected.
string
required
The plan’s source fingerprint from the GLiNER2 library, as 64 lowercase hexadecimal characters.
string
required
span or boundary.
string
whitespace, mixed or mixed_unicode_v1. Omit it or send null for the default.
object
required
The plan’s training configuration, as written by the GLiNER2 library.
integer
required
Number of optimizer updates, from 1 through 1,000,000. It must equal the number of batches with update: true.
object[]
required
Training examples, at least one. Each has input (string) and output (object) for a task the encoder supports.
object[]
required
The exact batch schedule, at least one batch. The last batch must have update: true.
object[]
required
Evaluation examples, in the same shape as examples. May be empty.
integer
required
Evaluation batch size, from 1 through 64.
boolean
required
Whether to keep the checkpoint with the best evaluation metric.
boolean
required
Whether a higher evaluation metric is better.
integer | null
required
Evaluations without improvement before training stops, at least 1. Send null to turn early stopping off.
number
required
Smallest change in the evaluation metric that counts as an improvement, at least 0.

Response

202 Accepted
string
The job the plan runs on.
string
The kind of call the future tracks.

Errors