How to fine tune a model using terminal

I have a file called abc.csv. I made it into a jsonl using: openai tools fine_tunes.prepare_data -f we-wingit-data.csv and I got this below:
Wrote modified file to we-wingit-data_prepared.jsonl
Feel free to take a look!

Now use that file when fine-tuning:

openai api fine_tunes.create -t “abc.jsonl”

After you’ve fine-tuned a model, remember that your prompt has to end with the indicator string -> for the model to start generating completions, rather than continuing with the prompt. Make sure to include stop=["\n"] so that the generated texts ends at the expected place.
Once your model starts training, it’ll approximately take 2.97 minutes to train a curie model, and less for ada and babbage. Queue will approximately take half an hour per job ahead of you.
Now I am trying to fine tune the jsonl file using comand :
openai api fine_tunes.create -t abc_prepared.jsonl -m gpt-3.5-turbo

but I get error:
usage: openai api [-h]
{chat.completions.create,images.generate,images.edit,images.create_variation,audio.transcriptions.create,audio.translations.create,files.create,files.retrieve,files.delete,files.list,models.list,models.retrieve,models.delete,completions.create}

openai api: error: argument {chat.completions.create,images.generate,images.edit,images.create_variation,audio.transcriptions.create,audio.translations.create,files.create,files.retrieve,files.delete,files.list,models.list,models.retrieve,models.delete,completions.create}: invalid choice: ‘fine_tunes.create’ (choose from ‘chat.completions.create’, ‘images.generate’, ‘images.edit’, ‘images.create_variation’, ‘audio.transcriptions.create’, ‘audio.translations.create’, ‘files.create’, ‘files.retrieve’, ‘files.delete’, ‘files.list’, ‘models.list’, ‘models.retrieve’, ‘models.delete’, ‘completions.create’)

I also tried to get the id and them use file id instead of file name, got the same issue. How to fix this?

Heya! Welcome to the forum.

What version of the library are you using?

pip install --upgrade openai

I did make an upgrade. My current version is openai 1.33.0

But still stuck on how to do it. Could not find anything in the docs either

Try to use the OpenAI client within a Python script?

from openai import OpenAI
client = OpenAI()

client.fine_tuning.jobs.create(
  training_file="file-abc123", 
  model="gpt-3.5-turbo"
)

You can fine more on how to fine-tune in the docs.

Yeah I saw this in documentation but been trying to use CLI as I feel its more neat to use