Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating fine tune with default params #16

Closed
JoseLuisRNP opened this issue Nov 9, 2022 · 1 comment · Fixed by #17
Closed

Error creating fine tune with default params #16

JoseLuisRNP opened this issue Nov 9, 2022 · 1 comment · Fixed by #17
Assignees

Comments

@JoseLuisRNP
Copy link

I facing a problem with the default params in open ai api fine tunes
Triyng creating a fine tunes with this code:

 $responseFineTuning = $openAIClient->fineTunes()->create([
    'training_file' => 'my_file_id',
    'model' => 'davinci',
]);

result in a trhow

 TypeError 

  OpenAI\Responses\FineTunes\RetrieveResponseHyperparams::__construct(): Argument #1 ($batchSize) must be of type int, null given, called in /code/vendor/openai-php/client/src/Responses/FineTunes/RetrieveResponseHyperparams.php on line 39

  at vendor/openai-php/client/src/Responses/FineTunes/RetrieveResponseHyperparams.php:20
     16▕      * @use ArrayAccessible<array{batch_size: int, learning_rate_multiplier: float, n_epochs: int, prompt_loss_weight: float}>
     17▕      */
     18use ArrayAccessible;
     19▕ 
  ➜  20private function __construct(
     21public readonly int $batchSize,
     22public readonly float $learningRateMultiplier,
     23public readonly int $nEpochs,
     24public readonly float $promptLossWeight,

      +3 vendor frames 
  4   app/App/Console/Commands/GenerateFineTuning.php
      OpenAI\Resources\FineTunes::create(["file-XXXXXXXXXXXXX", "davinci"])

      +13 vendor frames 
  18  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

Looking the api $batchSize is optional param and null by default

image

@gehrisandro
Copy link
Collaborator

@JoseLuisRNP thank you for raising the issue.

It has been fixed in v0.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants