Skip to main content

jobs

Creates, updates, deletes, gets or lists a jobs resource.

Overview

Namejobs
TypeResource
Idopenai.fine_tuning.jobs

Fields

NameDatatypeDescription
idstringThe object identifier, which can be referenced in the API endpoints.
created_atintegerThe Unix timestamp (in seconds) for when the fine-tuning job was created.
errorobjectFor fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
estimated_finishintegerThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.
fine_tuned_modelstringThe name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.
finished_atintegerThe Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.
hyperparametersobjectThe hyperparameters used for the fine-tuning job. See the fine-tuning guide for more details.
integrationsarrayA list of integrations to enable for this fine-tuning job.
modelstringThe base model that is being fine-tuned.
objectstringThe object type, which is always "fine_tuning.job".
organization_idstringThe organization that owns the fine-tuning job.
result_filesarrayThe compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the Files API.
seedintegerThe seed used for the fine-tuning job.
statusstringThe current status of the fine-tuning job, which can be either validating_files, queued, running, succeeded, failed, or cancelled.
trained_tokensintegerThe total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.
training_filestringThe file ID used for training. You can retrieve the training data with the Files API.
validation_filestringThe file ID used for validation. You can retrieve the validation results with the Files API.

Methods

NameAccessible byRequired ParamsDescription
list_paginated_fine_tuning_jobsSELECT
retrieve_fine_tuning_jobSELECTfine_tuning_job_id
create_fine_tuning_jobINSERTdata__model, data__training_file
cancel_fine_tuning_jobEXECfine_tuning_job_id

SELECT examples

SELECT
id,
created_at,
error,
estimated_finish,
fine_tuned_model,
finished_at,
hyperparameters,
integrations,
model,
object,
organization_id,
result_files,
seed,
status,
trained_tokens,
training_file,
validation_file
FROM openai.fine_tuning.jobs
;

INSERT example

Use the following StackQL query and manifest file to create a new jobs resource.

/*+ create */
INSERT INTO openai.fine_tuning.jobs (
data__model,
data__training_file,
data__hyperparameters,
data__suffix,
data__validation_file,
data__integrations,
data__seed
)
SELECT
'{{ model }}',
'{{ training_file }}',
'{{ hyperparameters }}',
'{{ suffix }}',
'{{ validation_file }}',
'{{ integrations }}',
'{{ seed }}'
;