fine-tuning

Retrieve a job

Poll a job until status is succeeded, failed, or cancelled. On success, fine_tuned_model is the name you predict against.

get/v1/fine_tuning/jobs/{job_id}

Path parameters

job_idstring required

The ftjob- prefixed id returned when the job was created.

Example:ftjob-a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d

Identifies the job to read.

Response

The job.

idstring required

Job id, prefixed ftjob-.

objectstring required

Always fine_tuning.job.

modelstring required

What the job trained from: the reflex you warm-started from, or the from-scratch base for a cold start.

created_atinteger required

Unix timestamp (seconds) at creation.

finished_atinteger nullable required

Unix timestamp at a terminal state, else null.

fine_tuned_modelstring nullable required

Served model name once succeeded (the suffix, or the job id if none).

status'queued' | 'validating_files' | 'running' | 'succeeded' | 'failed' | 'cancelled' required

validating_files is the data-prep phase for generate/label_data jobs.

labelsstring[] required

The classes this job trained on.

trained_examplesinteger required

Number of training examples.

suffixstring nullable required

The suffix supplied at creation, else null.

Example response

{
  "id": "ftjob-a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
  "object": "fine_tuning.job",
  "model": "guardrail",
  "created_at": 1780107000,
  "finished_at": 1780107148,
  "fine_tuned_model": "support-classifier",
  "status": "succeeded",
  "labels": [
    "billing",
    "bug"
  ],
  "trained_examples": 10,
  "hyperparameters": {
    "n_epochs": 3,
    "batch_size": "auto",
    "learning_rate_multiplier": "auto"
  },
  "result": {
    "accuracy": 0.95,
    "f1_score": 0.94
  },
  "error": null,
  "suffix": "support-classifier"
}

Changes

Changed in 1 of the 2 revisions of this API.232

  • b9a74274b2ab232See the full diff
    • removed the optional property error/type from the response with the 401 status

      response-optional-property-removed

    • removed the optional property error/type from the response with the 404 status

      response-optional-property-removed

    • api operation id getReflexJob removed and replaced with getFineTuningJob

      api-operation-id-removed

    • the endpoint scheme security bearerAuth was added to the API

      api-security-added

    • api tag fine-tuning added

      api-tag-added

    • api tag Reflex removed

      api-tag-removed

    • added the non-success response with the status 400

      response-non-success-status-added

    • added the non-success response with the status 429

      response-non-success-status-added

    • added the non-success response with the status 500

      response-non-success-status-added

    • the response property created_at became required for the status 200

      response-property-became-required

    • the response property error became required for the status 200

      response-property-became-required

    • the response property error/code became required for the status 200

      response-property-became-required

    • the response property error/code became required for the status 401

      response-property-became-required

    • the response property error/code became required for the status 404

      response-property-became-required

    • the response property error/message became required for the status 200

      response-property-became-required

    • the response property error/message became required for the status 401

      response-property-became-required

    • the response property error/message became required for the status 404

      response-property-became-required

    • the response property error/param became required for the status 200

      response-property-became-required

    • the response property fine_tuned_model became required for the status 200

      response-property-became-required

    • the response property finished_at became required for the status 200

      response-property-became-required

    • the response property hyperparameters became required for the status 200

      response-property-became-required

    • the response property hyperparameters/batch_size became required for the status 200

      response-property-became-required

    • the response property hyperparameters/learning_rate_multiplier became required for the status 200

      response-property-became-required

    • the response property hyperparameters/n_epochs became required for the status 200

      response-property-became-required

    • the response property id became required for the status 200

      response-property-became-required

    • the response property labels became required for the status 200

      response-property-became-required

    • the response property model became required for the status 200

      response-property-became-required

    • the response property object became required for the status 200

      response-property-became-required

    • the response property result became required for the status 200

      response-property-became-required

    • the response property result/accuracy became required for the status 200

      response-property-became-required

    • the response property result/f1_score became required for the status 200

      response-property-became-required

    • the response property status became required for the status 200

      response-property-became-required

    • the response property suffix became required for the status 200

      response-property-became-required

    • the response property trained_examples became required for the status 200

      response-property-became-required

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog