client icon indicating copy to clipboard operation
client copied to clipboard

[Bug]: $client->fineTuning()->listJobs() throws error when Fine Tunning contains the failed fine-tunning job.

Open dovelive opened this issue 1 year ago • 1 comments

Description

I have tried some fine tunings on my openai platform. And some of them are failed jobs. When I call the $client->fineTuning()->listJobs() function on my project, it throws the exception. I have checked the exception and it is because $attributes['hyperparameters'] is null for failed jobs.

 OpenAI\Responses\FineTuning\RetrieveJobResponseHyperparameters::from(): Argument #1 ($attributes) must be of type array, null given, called in ...

image

I want to developer of this site to make the patch for this error quickly.

Steps To Reproduce

try {
    $client = \OpenAI::client(config('openai.api_key'));
    $response = $client->fineTuning()->listJobs();
    $result = $response->toArray(); // ['object' => 'list', 'data' => [...]]
    var_dump($result);
} catch (\Exception $e) {
    report($e);
}

OpenAI PHP Client Version

v0.70.3

PHP Version

8.2

Notes

No response

dovelive avatar Dec 25 '24 16:12 dovelive

Do you have an easy way I can fail a fine tuning job in order to replicate? Or can you provide a redacted/exact payload of the response?

iBotPeaches avatar Apr 09 '25 10:04 iBotPeaches