2

I have trained a Detection model and would like to migrate the published iteration to an other prediction ressource using the Python SDK.

However i don't see how to create a new iteration in the training API and when trying to publish the following error happen : "CustomVisionErrorException: Project does not belong to user or resource".

Has anyone experienced the same issue ?

Hugo R
  • 21
  • 4

1 Answers1

0

OPTION 1: You can use the ExportProject and ImportProject APIs to migrate your iteration from one custom vision resource to another. Note: when importing, you may have to url-encode the token.

OPTION 2: The following document shows how to migrate custom vision projects from one region to another. Download the sample script contained in the document and run the following commands to migrate your project from one subscription or region to another. However, you'd need to re-train the model. Thanks.

pip install -r requirements.txt

#same region
python migrate_project.py -p "<project id>" -s "<source training key>" -d "<destination training key>"

#different regions
python migrate_project.py -p "<project id>" -s "<source training key>" -se "https://region.api.cognitive.microsoft.com" -d "<destination training key>" -de "https://region.api.cognitive.microsoft.com"
GiftA-MSFT
  • 479
  • 3
  • 7
  • Thanks for answering. however I already have the iteration I need, I would like to publish it on an other tenant without having to retrain my model. – Hugo R Feb 28 '20 at 09:42
  • Hi @HugoR, I have updated the answer. Please check out OPTION 1, hat should enable you to migrate your iteration to another prediction resource. – GiftA-MSFT Mar 12 '20 at 19:22