MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.27k stars 21.45k forks source link

Unable to find documentation for exporting CoreML model through API #12415

Closed Shoshin23 closed 6 years ago

Shoshin23 commented 6 years ago

[Enter feedback here]

Hi Team, I'm trying to export the core ML model after the training happens through the REST API but can't seem to find any documentation about it. Is it possible to do so right now without using the dashboard.

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

JasonWHowell commented 6 years ago

CC: @anrothMSFT @cjgronlund @Blackmist The labels didn't get assigned on this thread for some reason, but this look like a Cognitive Services question in case you know the answer. Thanks, Jason

vasivara-MSFT commented 6 years ago

@Shoshin23 Thanks for the feedback. We are actively investigating and will get back to you soon.

YutongTie-MSFT commented 6 years ago

@anrothMSFT Hi, this is a doc-enhancement issue here. Can you please help check it and update the document as necessary. Thanks a lot!

Blackmist commented 6 years ago

Hi @Shoshin23 , I wasn't able to find any documented examples on this, but I was able to do this earlier using the following steps:

  1. Create and train a model.
  2. Use get projects to retrieve the project ID: https://southcentralus.dev.cognitive.microsoft.com/docs/services/d0e77c63c39c4259a298830c15188310/operations/5a59953940d86a0f3c7a828f
  3. Use get iterations to get the iteration ID: https://southcentralus.dev.cognitive.microsoft.com/docs/services/d0e77c63c39c4259a298830c15188310/operations/5a59953940d86a0f3c7a8295
  4. Use export iteration to set the exported model type that I wanted to coreml. I left off the flavors parameter. https://southcentralus.dev.cognitive.microsoft.com/docs/services/d0e77c63c39c4259a298830c15188310/operations/5a59953940d86a0f3c7a829b
  5. Use get exports to get the download URL for the .mlmodel file: https://southcentralus.dev.cognitive.microsoft.com/docs/services/d0e77c63c39c4259a298830c15188310/operations/5a59953940d86a0f3c7a829a

I'll check and see if there's anything currently being worked on to document this, and if not we will work on a new document.

anrothMSFT commented 6 years ago

@Blackmist that is the correct sequence. If you write it, that would be awesome. If not, let me know, and I can take a crack at it. Shoshin23 is right, we could be a bit clearer here in how to to do this programatically, since the existing docs only describe the sequence in the portal.

nyghtwel commented 6 years ago

@Blackmist can youu tell me what domainId you used to create a general compact model

Blackmist commented 6 years ago

@nyghtwel Sorry for the late reply, was out of office for a few days. I used 0732100f-1a38-4e49-a514-c9b44c697ab5, which was returned by calling GetDomains (https://southcentralus.dev.cognitive.microsoft.com/docs/services/d0e77c63c39c4259a298830c15188310/operations/5a59953940d86a0f3c7a827d).

The curl request to create this looks like: curl -v -X POST "https://southcentralus.api.cognitive.microsoft.com/customvision/v2.0/Training/projects?name=myprojectname&domainId=0732100f-1a38-4e49-a514-c9b44c697ab5" -H "Training-key: mytrainingkey" --data-ascii ""

I'll finish up a document on this and publish this week.

YutongTie-MSFT commented 6 years ago

@Blackmist Thanks for your effort. Can I close the issue now?

Blackmist commented 6 years ago

@YutongTie-MSFT sure, go ahead and close.

@nyghtwel @Shoshin23 , the URL for the new document (after it is published) should be https://docs.microsoft.com/azure/cognitive-services/custom-vision-service/rest-api-tutorial. This will return a 404 until the document goes live.

YutongTie-MSFT commented 6 years ago

@Shoshin23 We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.