Error while exporting trainined model in Custom Vision API

Nikhil N 1 Reputation point
2021-07-09T13:31:09.033+00:00

I am using Custom vision python API for training a model. Everything runs fine when I train for the first time but while training the model again for the same project I get an error

"requests.exceptions.MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?"

I publish the iteration after training and also check if I am exporting the same using print statement. both are same.
Can you please help me solve this error?

Training status: Training
Training status: Completed
Publishing this project: AAAAAAAAAAAA
Iteration: BBBBBBBBBBBBBBB classifyModel
Done Training!
This project is being exported : AAAAAAAAAAAA
This project iteration is being exported : BBBBBBBBBBBBBBBBB
Done reading pipeline!
The model ABC has a precision value of: 0.0
The model ABC has a recall value of: 0.0
The model ABC has an average precision value of: 0.8333334
Something: {'additional_properties': {}, 'platform': 'TensorFlow', 'status': 'Exporting', 'download_uri': None, 'flavor': None,

'newer_version_available': False}

Second something: [<azure.cognitiveservices.vision.customvision.training.models._models_py3.Export object at LLLLLLLLLLLLLLLLLLL>]
Internal Server Error: /project/23/build_training/train/

Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
215 questions
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 46,566 Reputation points
    2021-07-10T23:03:05.62+00:00

    Hello,

    This issue seem you are passing wrong URL to the function. Please refer to below code sample:

    https://learn.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/quickstarts/image-classification?tabs=visual-studio&pivots=programming-language-python

    Especially the variables for your resource's Azure endpoint and subscription keys part:

    # Replace with valid values  
    ENDPOINT = "PASTE_YOUR_CUSTOM_VISION_TRAINING_ENDPOINT_HERE"  
    training_key = "PASTE_YOUR_CUSTOM_VISION_TRAINING_SUBSCRIPTION_KEY_HERE"  
    prediction_key = "PASTE_YOUR_CUSTOM_VISION_PREDICTION_SUBSCRIPTION_KEY_HERE"  
    prediction_resource_id = "PASTE_YOUR_CUSTOM_VISION_PREDICTION_RESOURCE_ID_HERE"  
    

    If you still can not find out the issue, please share the code your are using if that is not confidential.

    Regards,
    Yutong

    0 comments No comments