"File import error" when attempting to fine tune GPT-4o in Azure AI Foundry

Diogo Diogo 5 Reputation points
2025-03-18T15:47:55.5233333+00:00

Screenshot 2025-03-18 at 16.48.14

Hello, everyone!

I was following the course "Fine-tune a language model with Azure AI Foundry" and I am trying to execute the exercise where we should upload the 'travel-finetune-hotel.jsonl' file to fine tune gpt-4o. However, everytime that I try to that, I get the error: File import error: The provided subscription identifier 'resourceGroups' is malformed or invalid.

How should I fix this? Do you know if there is a way to deep-dive on the error? Should I investigate the Trace ID?

Thank you!

Azure | Azure Training
{count} votes

2 answers

Sort by: Most helpful
  1. VarunTha 14,850 Reputation points Microsoft External Staff Moderator
    2025-04-03T17:24:05.33+00:00

    Hi Diogo Diogo,

    One of the most frequent causes of the "File import error" you're getting while trying to fine-tune GPT-4 in Azure AI Foundry is that the file is not saved in the proper JSONL format. Make sure that the 'travel-finetune-hotel.jsonl' file is correctly formatted, with every line containing a valid JSON object. This is essential for the import process to be successful.
    User's image

    One more reason is that you are using fine-tuned GPT-4o instead of fine-tuned GPT-4.

    We also made an attempt from our side and achieved a successful outcome.
    fine tune 1

    fine tune 2

    Also, the error message you saw indicates that perhaps there is a problem with the subscription identifier. I would suggest verifying your Azure subscription and resource group settings to make sure they are properly configured. Making sure you have proper permissions to access the resources is also crucial.

    If you continue to experience difficulties, please don't hesitate to share any additional details or screenshots of the error, and I'll be glad to assist you further.

    If you have found the answer provided to be helpful, please click on the "Upvote and Accept Answer" button so that it is useful for other members in the Microsoft Q&A community.


  2. Hwang, Jun-Hyun@POST 0 Reputation points
    2025-04-21T23:44:49.3833333+00:00

    Hello @Diogo Diogo

    I had the same issue, but was able to resolve the issue.

    When you create your initial AI resource group in the foundry, you will need to deploy them to the region that fine tuning is supported. This includes all the resources in the resource group. Once that is set, you should be able to select the resource group in the basic settings page, as you create the fine tuning model, which you would have noticed, that it was greyed out, even though it is a required field.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.