Class: OpenAI::Models::FineTuning::FineTuningJob

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/fine_tuning/fine_tuning_job.rb,
sig/openai/models/fine_tuning/fine_tuning_job.rbs

Overview

See Also:

  • OpenAI::Resources::FineTuning::Jobs#create

Defined Under Namespace

Modules: Status Classes: Error, Hyperparameters, Method

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(code:, message:, param:) ⇒ Object

Parameters:

  • id

    The object identifier, which can be referenced in the API endpoints.

  • created_at

    The Unix timestamp (in seconds) for when the fine-tuning job was created.

  • error

    For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.

  • fine_tuned_model

    The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.

  • finished_at

    The 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.

  • hyperparameters

    The hyperparameters used for the fine-tuning job. This value will only be returned when running supervised jobs.

  • model

    The base model that is being fine-tuned.

  • organization_id

    The organization that owns the fine-tuning job.

  • result_files

    The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the Files API.

  • seed

    The seed used for the fine-tuning job.

  • status

    The current status of the fine-tuning job, which can be either validating_files, queued, running, succeeded, failed, or cancelled.

  • trained_tokens

    The 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_file

    The file ID used for training. You can retrieve the training data with the Files API.

  • validation_file

    The file ID used for validation. You can retrieve the validation results with the Files API.

  • estimated_finish

    The 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.

  • integrations

    A list of integrations to enable for this fine-tuning job.

  • metadata

    Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

    Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

  • method_

    The method used for fine-tuning.

  • object

    The object type, which is always "fine_tuning.job".



# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 145

Instance Attribute Details

#created_atInteger

The Unix timestamp (in seconds) for when the fine-tuning job was created.

Returns:

  • (Integer)


18
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 18

required :created_at, Integer

#errorOpenAI::FineTuning::FineTuningJob::Error?

For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.

Returns:

  • (OpenAI::FineTuning::FineTuningJob::Error, nil)


25
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 25

required :error, -> { OpenAI::FineTuning::FineTuningJob::Error }, nil?: true

#estimated_finishInteger?

The 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.

Returns:

  • (Integer, nil)


114
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 114

optional :estimated_finish, Integer, nil?: true

#fine_tuned_modelString?

The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.

Returns:

  • (String, nil)


32
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 32

required :fine_tuned_model, String, nil?: true

#finished_atInteger?

The 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.

Returns:

  • (Integer, nil)


39
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 39

required :finished_at, Integer, nil?: true

#hyperparametersOpenAI::FineTuning::FineTuningJob::Hyperparameters

The hyperparameters used for the fine-tuning job. This value will only be returned when running supervised jobs.

Returns:

  • (OpenAI::FineTuning::FineTuningJob::Hyperparameters)


46
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 46

required :hyperparameters, -> { OpenAI::FineTuning::FineTuningJob::Hyperparameters }

#idString

The object identifier, which can be referenced in the API endpoints.

Returns:

  • (String)


12
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 12

required :id, String

#integrations::Array[OpenAI::FineTuning::FineTuningJobWandbIntegrationObject]?

A list of integrations to enable for this fine-tuning job.

Returns:

  • (::Array[OpenAI::FineTuning::FineTuningJobWandbIntegrationObject], nil)


120
121
122
123
124
125
126
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 120

optional(
  :integrations,
  -> {
    OpenAI::Internal::Type::ArrayOf[OpenAI::FineTuning::FineTuningJobWandbIntegrationObject]
  },
  nil?: true
)

#metadataOpenAI::Models::metadata?

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

Returns:

  • (OpenAI::Models::metadata, nil)


137
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 137

optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true

#method_OpenAI::FineTuning::FineTuningJob::Method?

The method used for fine-tuning.

Returns:

  • (OpenAI::FineTuning::FineTuningJob::Method, nil)


143
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 143

optional :method_, -> { OpenAI::FineTuning::FineTuningJob::Method }, api_name: :method

#modelString

The base model that is being fine-tuned.

Returns:

  • (String)


52
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 52

required :model, String

#object:"fine_tuning.job"

The object type, which is always "fine_tuning.job".

Returns:

  • (:"fine_tuning.job")


58
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 58

required :object, const: :"fine_tuning.job"

#organization_idString

The organization that owns the fine-tuning job.

Returns:

  • (String)


64
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 64

required :organization_id, String

#result_files::Array[String]

The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the Files API.

Returns:

  • (::Array[String])


72
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 72

required :result_files, OpenAI::Internal::Type::ArrayOf[String]

#seedInteger

The seed used for the fine-tuning job.

Returns:

  • (Integer)


78
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 78

required :seed, Integer

#statusOpenAI::Models::FineTuning::FineTuningJob::status

The current status of the fine-tuning job, which can be either validating_files, queued, running, succeeded, failed, or cancelled.

Returns:

  • (OpenAI::Models::FineTuning::FineTuningJob::status)


85
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 85

required :status, enum: -> { OpenAI::FineTuning::FineTuningJob::Status }

#trained_tokensInteger?

The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.

Returns:

  • (Integer, nil)


92
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 92

required :trained_tokens, Integer, nil?: true

#training_fileString

The file ID used for training. You can retrieve the training data with the Files API.

Returns:

  • (String)


99
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 99

required :training_file, String

#validation_fileString?

The file ID used for validation. You can retrieve the validation results with the Files API.

Returns:

  • (String, nil)


107
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 107

required :validation_file, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 365

.variantsArray(Symbol, :auto, Integer)

Returns:

  • (Array(Symbol, :auto, Integer))


# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 346

Instance Method Details

#to_hash{

Returns:

  • ({)


186
# File 'sig/openai/models/fine_tuning/fine_tuning_job.rbs', line 186

def to_hash: -> {