agiveon
February 7, 2025, 12:18am
1
I am finetuning the vision model
Example is:
from openai import OpenAI
client = OpenAI()
client.fine_tuning.jobs.create(
training_file=“file-abc123”,
model=“gpt-4o-mini”,
method={
“type”: “supervised”,
“supervised”: {
“hyperparameters”: {
“n_epochs”: 2
}
}
}
)
I get an error:
client.fine_tuning.jobs.create(
TypeError: Jobs.create() got an unexpected keyword argument ‘method’
_j
February 7, 2025, 12:41am
2
Notice how you were blocked, but no 400 Bad Request?
The OpenAI library doesn’t validate what you are trying to send.
An update to the latest version with pip install --upgrade openai
will let it pass.
agiveon
February 7, 2025, 12:54am
3
I am not sure what you meant with “Notice how you were blocked, but no 400 Bad Request?”, but the upgrade fixed it! Thank you!
1 Like
_j
February 7, 2025, 12:59am
4
Meaning:
If you were to send an API parameter that the endpoint doesn’t understand, you would be receiving a network error.
The API call didn’t get that far, because the OpenAI library has a list of what is (or was) accepted. That is what blocked you - your local library. It becomes quickly obsolete.
Glad it was resolved so simply!