I have created a data science neural network in Python anaconda Spyder. My projects have multiple .py files and I have trained this model for 10 days and weights are generated. I want to use this model as a service and want to deploy it to Azure for consumption. I tried following but facing difficulties -
1) I tried deploying this as "Execute Python Script" in Azure ML studio but I am not finding an option to upload the weights. I understand I can zip all the .py files but what about the trained weights and virtual environment (I am using an old version of tensorflow)?
2) I am seeing an option of creating a Jupyter notebook but my project is created in Spyder and doesn't have .ipynb files. Is there any way to convert my .py files into .ipynb files? ALso, I have created a virtual environment with the older version of tensorflow and python version? How to take care of this while deploying to azure?
3) I tried deploying this to azure as a python web app but again what shall I do with the virtual environment and my existing weights? Also, how do I create my configuration or dependency file required for webapp?
Please, can you let me know the best method to deploy this solution to azure with weights if possible?
Thanks
requirements.txt
file to specify all packages you need. And Azure web app will automatically create a virtualenv and install every packages in requirements.txt
.You’ll need an Azure subscription (create one free here). Then you’ll need to create an Azure Machine Learning service workspace resource in your tenant. Once you spin up the workspace, you will also need to create a Notebook VM, then open a Jupyter notebook to code in. Each of the code segments below are blocks of code inside of the notebook I created for this demo.
We will cover three major sections in our walkthrough: 1) setting up the development environment, 2) training the predictive model, and 3) deploying the model as an Azure ML service – each step has several sub-steps.
We’ll begin by setting up our environment and getting it ready to train an experiment. There are five essential steps to getting our environment ready for an experiment: