Why is Image class DEPRECATED?
[Enter feedback here] We have been using Image class a lot in our customer deliveries. The typical use cases are that we train and test ML models and packetize the models in a docker format and ship to customers. Customer are feel to deploy the docker image to anywhere as they wish, e.g., cloud, kubernetes or virtual machines. In the document Environment is suggested for the replacement. But Environment is only usable for Azure native components such as webservice on ACI or AKS.
I do not know how we can continue with current setup. Do you have suggestions?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 6711f801-4198-db54-ab49-f015ba6df9af
- Version Independent ID: 86352057-dd38-825d-7f5d-e7967274c2d3
- Content: azureml.core.Image class - Azure Machine Learning Python
- Content Source: AzureML-Docset/stable/docs-ref-autogen/azureml-core/azureml.core.Image(class).yml
- Service: machine-learning
- Sub-service: core
- GitHub Login: @debfro
- Microsoft Alias: debfro
The Environment approach builds the same docker image and customers are free to deploy anywhere. What are the specific limitations you experiencing?
Well, the reply is not convincing.
So far what I understand based on documents and guesses is that an image will be built only when a model is deployed either in webservice (ACI or AKS). But the image names not intuitive. It is almost impossible to find the image without clicking one-by-one. If the same pipeline runs several times, then there will several images with new hash name. Again it is very hard to figure out which image is the latest one. Maybe I missed something (but I do not think I missed anything)
At this moment, there are three ways to create a docker image. One was mentioned above, that is docker image is built when webservice is created. As I mentioned, the resulting image name is hash and there will be different images (hashes) instead of versioning. It is hard figure out which image is right image. The second way is to use Model.package and another way is to use Image.create. Both second and third methods allow a user to define docker image name. However, these two methods use different tagging mechanism (one is just incremental number, the other one is timestamp) and Image(....., version='latest') only returns the latest image built by Image.create even if the image built by Model.package is the latest one .
Current webservice.deploy_from_image is not going to be deprecated (at least in documentation it was mentioned) and still takes an Image class object. Is this function going to be deprecated eventually ? If yes, how to deploy webservice from a docker image? Can you show me example codes ?
Another comments not directly related to this particular topic but why there is not sdk version specific API documentation ? People can check the documentation of the version they are using ? What does it mean stable and experimental ? Is version 0.1.57 released in 2018 stable version and the rest including 1.12.0 are experimental version ?
Did you read the documentation on packaging a model into an image? https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-package-models
Webservice.deploy_from_image should be marked as deprecated. I'm adding @gvashishtha to address your feedback
@jpe316 There is always a way to build a solution, like in the document, download the image and run locally. But a better way will be (in our case), we train and test the model and packetize in a docker format and deploy to webservice from the docker image. Clients can test webservice directly and if clients are satisfied then we just deliver the docker image that is used in the webservice. Because of deprecating Image class, we have to deploy webservice from registered model and build docker image separately using Model.package in the same pipeline. Eventually there are two identical images built (one from webservice deployment). In a way it is very clumsy, wasting time and resources.
Deploying a model was very smooth before regardless from python sdk or azure ml portal. From azure ml portal, a user can deploy a model simply by clicking deployment from image built previously where all dependencies are included.
Now without deploying from Image feature in the Current Azure ML portal, it is reaaaaaly inconvenient to deploy a model from portal. User has to manually provide all dependencies, including entry script, conda file, and other dependencies. I am feeling Azure ML has regressed significantly. Can you explain why you would like to get rid of Image based solutions and features ?

Hi, this decision was taken by the product team after receiving lot of feedback about having to build new images for each tiny change that needs to be deployed. Hence AML now keeps the same base image but mounts models and scripts by default. As a replacement, model.package is available to build the image. We are in discussions about supporting a BYOC feature which will let you directly use the package built using model.package for your deployment.