How can I register in Azure ML Service a machine learning model trained locally?

↘锁芯ラ 提交于 2019-12-31 07:39:31

问题


I am trying out Azure Machine Learning Service for ML deployment.

I have already trained a model on a compute VM and saved it as pickle, and now would like to deploy it (I am using Python on Azure notebooks for the purpose as of now).

From the guide, it looks like I need to I need a run object to be existing in my session to execute the "model registration" step:

# register model 
model = run.register_model(model_name='my_model', model_path='outputs/my_model.pkl')
print(model.name, model.id, model.version, sep = '\t')

However, I haven't created any run object as I haven't executed any experiment for training, I am just starting off with my pickled model.

I also tried to register a model by uploading it via the Azure Portal (see screenshot below), but (as the model file is quite large, I assume) it fails with a ajax error 413. as in Unable to register an ONNX model in azure machine learning service workspace.

Is there any way to register and then deploy a pretrained pickled mode (without the need of submitting a run, if that makes sense)?


回答1:


Model registration can be done with Model.register, without the need of using a run object

model = Model.register(model_name='my_model', model_path='my_model.pkl', workspace = ws)

for the deployment one can follow steps as outlined in the Azure ML service doc.




回答2:


You can also register your model manualy in the web portal.



来源:https://stackoverflow.com/questions/55277334/how-can-i-register-in-azure-ml-service-a-machine-learning-model-trained-locally

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!