I am not able to delete fine-tuning model (gpt-3.5-turbo)

Hi good morning, I can’t delete the model I created.
if I run the code:

openai.FineTuningJob.list_events(id="ftjob-XXXXXXXXXXXXXXX", limit=10)

I receive:

{
  "object": "fine_tuning.job",
  "id": "ftjob-XXXXXXXXXXXXXXXXX",
  "model": "gpt-3.5-turbo-0613",
  "created_at": 1693563370,
  "finished_at": 1693563938,
  "fine_tuned_model": "ft:gpt-3.5-turbo-0613:riccardo-castagna::7tvdLvcs",
  "organization_id": "org-XXXXXXXXXXXXXXXXX",
  "result_files": [
    "file-mAL9wlgXC96aPElOnFaRZVBl"
  ],
  "status": "succeeded",
  "validation_file": null,
  "training_file": "file-jnStgp6MVIthX91c8k8pkmcN",
  "hyperparameters": {
    "n_epochs": 8
  },
  "trained_tokens": 10904
}

when i try to delete the model with the code:

openai.Model.delete("ft:gpt-3.5-turbo-0613:riccardo-castagna::7tvdLvcs")

I recive the error : error the model does not exist

I tried also through API DELETE:

    load_dotenv()
    openai.api_key = os.getenv("OPENAI_API_KEY")
    AuTh = "Bearer " + openai.api_key
    headers = {"Authorization":AuTh}
    t = requests.delete("https://api.openai.com/v1/models/ft:gpt-3.5-turbo-0613:riccardo-castagna::7tvdLvcs", headers=headers)

and I receice : Response [404]
Someone can help me please?

Does it still show up in in your model list in the Playground or openai.Model.list()? You may have already deleted it, and subsequent tries are failing because it’s already gone.

I’m guessing the FineTuningJob.list_events may always return that data because your asking about the event of the fine-tuning, not which models still exist.

2 Likes

Yes in Playground model list, Yes
In openai.Model.list(), No

Ok, thank you …
at this point, therefore, I deduce that the model has been deleted, even if I have never received any confirmation message from the API.

1 Like