Problem with API key while fine-tuning

Hi, everyone. Nice to meet you. I just started using Open AI for my personal projects recently and currently face a problem I can’t seem to overcome.

I am trying to fine tune a model and I am following the instructions exaclty as they are in OpenAI’s website. When I’m using the !openai api fine_tunes.create -t ‘<PREPARED_FILE>’ -m ‘<MODEL’ command I am getting the following error:

Error: No API key provided. You can set your API key in code using ‘openai.api_key = ’, or you can set the environment variable OPENAI_API_KEY=). If your API key is stored in a file, you can point the openai module at it with ‘openai.api_key_path = ’. You can generate API keys in the OpenAI web interface.

I tried setting the key as it is recommended in the error but nothing happens. The key is valid, i can use it for other tasks (for example I can use it to call a model for text completion). I am working on google colab.
Could anybody help me?


I have this same issue. Anyone can help?

I have an opinion.
I think your openai api_key is not allowed to fine tune selected GPT3 model.
You can check which models you can finetune using this command in python.
import openai
openai.api_key = OPENAI_API_KEY
Here, only “allow_fine_tuning”: true models you can finetune.