Class: OpenAI::Resources::FineTuning::Jobs
- Inherits:
-
Object
- Object
- OpenAI::Resources::FineTuning::Jobs
- Defined in:
- lib/openai/resources/fine_tuning/jobs.rb,
lib/openai/resources/fine_tuning/jobs/checkpoints.rb
Defined Under Namespace
Classes: Checkpoints
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#cancel(fine_tuning_job_id, request_options: {}) ⇒ OpenAI::Models::FineTuning::FineTuningJob
Some parameter documentations has been truncated, see Models::FineTuning::JobCancelParams for more details.
-
#create(model: , training_file: , hyperparameters: nil, integrations: nil, metadata: nil, method_: nil, seed: nil, suffix: nil, validation_file: nil, request_options: {}) ⇒ OpenAI::Models::FineTuning::FineTuningJob
Some parameter documentations has been truncated, see Models::FineTuning::JobCreateParams for more details.
-
#initialize(client:) ⇒ Jobs
constructor
private
A new instance of Jobs.
-
#list(after: nil, limit: nil, metadata: nil, request_options: {}) ⇒ OpenAI::Internal::CursorPage<OpenAI::Models::FineTuning::FineTuningJob>
Some parameter documentations has been truncated, see Models::FineTuning::JobListParams for more details.
-
#list_events(fine_tuning_job_id, after: nil, limit: nil, request_options: {}) ⇒ OpenAI::Internal::CursorPage<OpenAI::Models::FineTuning::FineTuningJobEvent>
Some parameter documentations has been truncated, see Models::FineTuning::JobListEventsParams for more details.
-
#pause(fine_tuning_job_id, request_options: {}) ⇒ OpenAI::Models::FineTuning::FineTuningJob
Some parameter documentations has been truncated, see Models::FineTuning::JobPauseParams for more details.
-
#resume(fine_tuning_job_id, request_options: {}) ⇒ OpenAI::Models::FineTuning::FineTuningJob
Some parameter documentations has been truncated, see Models::FineTuning::JobResumeParams for more details.
-
#retrieve(fine_tuning_job_id, request_options: {}) ⇒ OpenAI::Models::FineTuning::FineTuningJob
Some parameter documentations has been truncated, see Models::FineTuning::JobRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ Jobs
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Jobs.
214 215 216 217 |
# File 'lib/openai/resources/fine_tuning/jobs.rb', line 214 def initialize(client:) @client = client @checkpoints = OpenAI::Resources::FineTuning::Jobs::Checkpoints.new(client: client) end |
Instance Attribute Details
#checkpoints ⇒ OpenAI::Resources::FineTuning::Jobs::Checkpoints (readonly)
8 9 10 |
# File 'lib/openai/resources/fine_tuning/jobs.rb', line 8 def checkpoints @checkpoints end |
Instance Method Details
#cancel(fine_tuning_job_id, request_options: {}) ⇒ OpenAI::Models::FineTuning::FineTuningJob
Some parameter documentations has been truncated, see Models::FineTuning::JobCancelParams for more details.
Immediately cancel a fine-tune job.
126 127 128 129 130 131 132 133 |
# File 'lib/openai/resources/fine_tuning/jobs.rb', line 126 def cancel(fine_tuning_job_id, params = {}) @client.request( method: :post, path: ["fine_tuning/jobs/%1$s/cancel", fine_tuning_job_id], model: OpenAI::FineTuning::FineTuningJob, options: params[:request_options] ) end |
#create(model: , training_file: , hyperparameters: nil, integrations: nil, metadata: nil, method_: nil, seed: nil, suffix: nil, validation_file: nil, request_options: {}) ⇒ OpenAI::Models::FineTuning::FineTuningJob
Some parameter documentations has been truncated, see Models::FineTuning::JobCreateParams for more details.
Creates a fine-tuning job which begins the process of creating a new model from a given dataset.
Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.
[Learn more about fine-tuning](platform.openai.com/docs/guides/fine-tuning)
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/openai/resources/fine_tuning/jobs.rb', line 46 def create(params) parsed, = OpenAI::FineTuning::JobCreateParams.dump_request(params) @client.request( method: :post, path: "fine_tuning/jobs", body: parsed, model: OpenAI::FineTuning::FineTuningJob, options: ) end |
#list(after: nil, limit: nil, metadata: nil, request_options: {}) ⇒ OpenAI::Internal::CursorPage<OpenAI::Models::FineTuning::FineTuningJob>
Some parameter documentations has been truncated, see Models::FineTuning::JobListParams for more details.
List your organization’s fine-tuning jobs
100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/openai/resources/fine_tuning/jobs.rb', line 100 def list(params = {}) parsed, = OpenAI::FineTuning::JobListParams.dump_request(params) @client.request( method: :get, path: "fine_tuning/jobs", query: parsed, page: OpenAI::Internal::CursorPage, model: OpenAI::FineTuning::FineTuningJob, options: ) end |
#list_events(fine_tuning_job_id, after: nil, limit: nil, request_options: {}) ⇒ OpenAI::Internal::CursorPage<OpenAI::Models::FineTuning::FineTuningJobEvent>
Some parameter documentations has been truncated, see Models::FineTuning::JobListEventsParams for more details.
Get status updates for a fine-tuning job.
153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/openai/resources/fine_tuning/jobs.rb', line 153 def list_events(fine_tuning_job_id, params = {}) parsed, = OpenAI::FineTuning::JobListEventsParams.dump_request(params) @client.request( method: :get, path: ["fine_tuning/jobs/%1$s/events", fine_tuning_job_id], query: parsed, page: OpenAI::Internal::CursorPage, model: OpenAI::FineTuning::FineTuningJobEvent, options: ) end |
#pause(fine_tuning_job_id, request_options: {}) ⇒ OpenAI::Models::FineTuning::FineTuningJob
Some parameter documentations has been truncated, see Models::FineTuning::JobPauseParams for more details.
Pause a fine-tune job.
179 180 181 182 183 184 185 186 |
# File 'lib/openai/resources/fine_tuning/jobs.rb', line 179 def pause(fine_tuning_job_id, params = {}) @client.request( method: :post, path: ["fine_tuning/jobs/%1$s/pause", fine_tuning_job_id], model: OpenAI::FineTuning::FineTuningJob, options: params[:request_options] ) end |
#resume(fine_tuning_job_id, request_options: {}) ⇒ OpenAI::Models::FineTuning::FineTuningJob
Some parameter documentations has been truncated, see Models::FineTuning::JobResumeParams for more details.
Resume a fine-tune job.
202 203 204 205 206 207 208 209 |
# File 'lib/openai/resources/fine_tuning/jobs.rb', line 202 def resume(fine_tuning_job_id, params = {}) @client.request( method: :post, path: ["fine_tuning/jobs/%1$s/resume", fine_tuning_job_id], model: OpenAI::FineTuning::FineTuningJob, options: params[:request_options] ) end |
#retrieve(fine_tuning_job_id, request_options: {}) ⇒ OpenAI::Models::FineTuning::FineTuningJob
Some parameter documentations has been truncated, see Models::FineTuning::JobRetrieveParams for more details.
Get info about a fine-tuning job.
[Learn more about fine-tuning](platform.openai.com/docs/guides/fine-tuning)
73 74 75 76 77 78 79 80 |
# File 'lib/openai/resources/fine_tuning/jobs.rb', line 73 def retrieve(fine_tuning_job_id, params = {}) @client.request( method: :get, path: ["fine_tuning/jobs/%1$s", fine_tuning_job_id], model: OpenAI::FineTuning::FineTuningJob, options: params[:request_options] ) end |