7

I have created two models in azure ml studio and i want to download those models.

Is it possible to download train and score models from azure ml studio?

4 Answers4

2

It is actually possible. First, transform your experiment as a retraining web-service, then download (right-click on the module) the output of the web-service module that is connected to the "train model" module. Sample 5: Train, Test, Evaluate for Binary Classification: Adult Dataset

Ahmet
  • 802
  • 1
  • 5
  • 18
  • As far as I know there is no option to download when you right-click the web-service module. It has no output. – mrjrdnthms Jun 15 '17 at 21:52
  • You can, trust me I work in this team ;). https://blogs.technet.microsoft.com/machinelearning/2017/06/19/loading-a-trained-model-dynamically-in-an-azure-ml-web-service/ – Ahmet Jul 06 '17 at 16:03
  • It should still be working... If you are facing an issue, please reach out to the team (I've left). – Ahmet Jun 27 '18 at 21:50
  • This requires web access and an API key. While still useful, it's not the same as downloading the model itself. (Some of the example code: print("The results for " + outputName + " are available at the following Azure Storage location:")) – SimLeek May 07 '19 at 21:06
  • Hi @Ahmet I have tried what you mentioned but I am not able to download the model onto a local computer. Would it be possible for you to share more details on this one. – Nouman Qaiser Mar 24 '21 at 05:59
  • @Ahmet I have written a more detailed question here: https://stackoverflow.com/questions/66775579/download-a-trained-ml-model-from-azure-ml-studio-to-deploy-on-a-standalone-compu – Nouman Qaiser Mar 24 '21 at 06:29
1

Models can be trained, scored, saved, and run in AzureML studio, but can't downloaded to your local machine. There's no way to do anything with a model outside of AzureML.

andyabel
  • 335
  • 4
  • 15
  • 4
    This is so wrong for the 2020 version of azure-sdk. You CAN download model or train locally. AzureML Studio and its workspace can act as an experiment wrapper. – Brian Ng Oct 12 '20 at 09:25
  • That's great news! My answer was written 3 years ago. – andyabel Oct 13 '20 at 15:33
  • just an update, however, AWS is still out of the sight for this feature, which is quite weird. – Brian Ng Nov 09 '20 at 16:23
  • 3
    @BrianNg would you please explain more, how we can download the model trained in AzureML to our local machine? – Sara .Eft Jan 19 '21 at 15:55
0

From this link: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-train-pytorch

"You can also download a local copy of the model by using the Run object. In the training script pytorch_train.py, a PyTorch save object persists the model to a local folder (local to the compute target). You can use the Run object to download a copy."

# Create a model folder in the current directory
os.makedirs('./model', exist_ok=True)

# Download the model from run history
run.download_file(name='outputs/model.pt',
output_file_path='./model/model.pt')

This is available for different frameworks: pytorch, keras etc.

0
az ml model download --model-id
                     --target-dir
                     [--overwrite]
                     [--path]
                     [--resource-group]
                     [--subscription-id]
                     [--workspace-name]
                     [-v]

you gotta install azure-cli though