From the course: OpenAI API: Fine-Tuning

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Creating a fine-tuning job through the API

Creating a fine-tuning job through the API - OpenAI API Tutorial

From the course: OpenAI API: Fine-Tuning

Creating a fine-tuning job through the API

- [Instructor] Now we can start the fine tuning job and that's done using the client.find_tuning.jobs.create () This method has two mandatory properties, model and training file and a set of optional properties, validation file, suffix, seed, batch size, learning rate, multiplier, and an epochs and you'll notice these are the same properties you saw in the UI interface that we used inside platform lot openai.com. Scrolling down, here's a code log with an example of how we can do this. I set up a response. This is a container for the entire process. Then I call client.fine_tuning jobs.create, I pass in the training file with the training file id, the validation file with the validation file id, then the model id, so this can be any model including previously fine tuned models. And then finally I set up a suffix so it's easier to find the build after it's complete. Then I go in and grab response and pull out the ID and set it as a job ID and I output the response ID and the response…

Contents