How do I fix "openai.BadRequestError: Error code: 400" while fine tuning my model?

Kayla Farivar 45 Reputation points
2024-06-28T17:19:57.3566667+00:00

I'm running the basic python quickstart code with my training and validation jsonl files inputted and I've run into the following error:

"openai.BadRequestError: Error code: 400 - {'error': {'code': 'invalidPayload', 'message': 'The specified file reference must point to a completed file import.'}}"

What do you recommend I try to fix this?

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,599 questions
{count} vote

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 48,491 Reputation points
    2024-06-29T09:55:32.6233333+00:00

    Hello @Kayla Farivar

    Thanks for reaching out to us, could you please share your code details and data file so that we can help you debug further?

    Actually, you can leverage Azure Open AI Studio to validate your data as this document - https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/fine-tuning?tabs=turbo%2Cpython-new&pivots=programming-language-studio#prepare-your-training-and-validation-data

    Your training data and validation data sets consist of input and output examples for how you would like the model to perform. Different model types require a different format of training data.

    Please take a look at the document and let us know if you have any questions.

    Regards,

    Yutong

    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    0 comments No comments