New📚 Introducing our captivating new product - Explore the enchanting world of Novel Search with our latest book collection! 🌟📖 Check it out

Write Sign In
Library BookLibrary Book
Write
Sign In
Member-only story

Deploy Models in AWS SageMaker, Google Cloud and Microsoft Azure

Jese Leos
·17.2k Followers· Follow
Published in Beginning MLOps With MLFlow: Deploy Models In AWS SageMaker Google Cloud And Microsoft Azure
5 min read ·
404 View Claps
37 Respond
Save
Listen
Share

Machine learning models are only as useful as their ability to be deployed and used in production. This article will teach you how to deploy your machine learning models to production using three of the major cloud platforms: AWS SageMaker, Google Cloud and Microsoft Azure.

Beginning MLOps with MLFlow: Deploy Models in AWS SageMaker Google Cloud and Microsoft Azure
Beginning MLOps with MLFlow: Deploy Models in AWS SageMaker, Google Cloud, and Microsoft Azure
by I. D. Oro

4.1 out of 5

Language : English
File size : 20154 KB
Text-to-Speech : Enabled
Enhanced typesetting : Enabled
Print length : 346 pages
Screen Reader : Supported
Hardcover : 160 pages
Item Weight : 14.4 ounces
Dimensions : 5.98 x 0.5 x 9.02 inches

AWS SageMaker

AWS SageMaker is a fully managed service that makes it easy to build, train, and deploy machine learning models. SageMaker offers a variety of tools and services to help you with every step of the machine learning process, from data preparation to model deployment.

To deploy a model in SageMaker, you can use the SageMaker console, the AWS CLI, or the SageMaker Python SDK. The following code sample shows how to deploy a model using the SageMaker Python SDK:

python import sagemaker

# Create a SageMaker client client = sagemaker.Session()

# Create a model model = client.create_model( name="my-model", role="arn:aws:iam::123456789012:role/my-role", container={ "image": "my-image", "model_data": "my-model-data" })

# Deploy the model endpoint = client.create_endpoint( name="my-endpoint", model_name="my-model" )

Once your model is deployed, you can use the SageMaker endpoint to make predictions. The following code sample shows how to make a prediction using the SageMaker Python SDK:

python import sagemaker

# Create a SageMaker client client = sagemaker.Session()

# Create an endpoint endpoint = client.create_endpoint( name="my-endpoint", model_name="my-model" )

# Make a prediction prediction = endpoint.predict( data="my-data" )

Google Cloud

Google Cloud is another major cloud platform that offers a variety of services for machine learning. Google Cloud Machine Learning Engine is a fully managed service that makes it easy to deploy and manage your machine learning models.

To deploy a model in Google Cloud Machine Learning Engine, you can use the Google Cloud console, the gcloud command-line tool, or the Google Cloud Python client library. The following code sample shows how to deploy a model using the Google Cloud Python client library:

python import google.cloud.aiplatform

# Create a client client = google.cloud.aiplatform.gapic.EndpointServiceClient()

# Create a model model = { "display_name": "my-model", "container_spec": { "image_uri": "my-image", "command": ["my-command"], "args": ["my-args"] }}

# Create an endpoint endpoint = { "display_name": "my-endpoint", "deployed_models": [ { "model": model }] }

# Deploy the model client.create_endpoint( parent="projects/PROJECT_ID/locations/LOCATION", endpoint=endpoint )

Once your model is deployed, you can use the Google Cloud Machine Learning Engine endpoint to make predictions. The following code sample shows how to make a prediction using the Google Cloud Python client library:

python import google.cloud.aiplatform

# Create a client client = google.cloud.aiplatform.gapic.PredictionServiceClient()

# Create an endpoint endpoint = client.endpoint_path( project="PROJECT_ID", location="LOCATION", endpoint="ENDPOINT_ID" )

# Make a prediction prediction = client.predict( endpoint=endpoint, instances=[ { "features": { "my-feature": 1.0 }}] )

Microsoft Azure

Microsoft Azure is a third major cloud platform that offers a variety of services for machine learning. Azure Machine Learning is a fully managed service that makes it easy to build, train, and deploy machine learning models.

To deploy a model in Azure Machine Learning, you can use the Azure Machine Learning studio, the Azure CLI, or the Azure Machine Learning Python SDK. The following code sample shows how to deploy a model using the Azure Machine Learning Python SDK:

python import azureml.core

# Create a workspace workspace = azureml.core.Workspace.from_config()

# Create a model model = azureml.core.Model(workspace, name="my-model") model.upload_file("my-model.pkl")

# Create a deployment configuration deployment_config = azureml.core.DeploymentConfiguration( name="my-deployment", model=model, endpoint_name="my-endpoint" )

# Deploy the model deployment = workspace.deployments.create(deployment_config)

Once your model is deployed, you can use the Azure Machine Learning endpoint to make predictions. The following code sample shows how to make a prediction using the Azure Machine Learning Python SDK:

python import azureml.core

# Create a workspace workspace = azureml.core.Workspace.from_config()

# Create an endpoint endpoint = workspace.endpoints["my-endpoint"]

# Make a prediction prediction = endpoint.predict(data="my-data")

In this article, you learned how to deploy your machine learning models to production using AWS SageMaker, Google Cloud and Microsoft Azure. These three cloud platforms offer a variety of tools and services to help you with every step of the machine learning process, from data preparation to model deployment.

By following the instructions in this article, you can quickly and easily deploy your machine learning models to production and start using them to make predictions.

Beginning MLOps with MLFlow: Deploy Models in AWS SageMaker Google Cloud and Microsoft Azure
Beginning MLOps with MLFlow: Deploy Models in AWS SageMaker, Google Cloud, and Microsoft Azure
by I. D. Oro

4.1 out of 5

Language : English
File size : 20154 KB
Text-to-Speech : Enabled
Enhanced typesetting : Enabled
Print length : 346 pages
Screen Reader : Supported
Hardcover : 160 pages
Item Weight : 14.4 ounces
Dimensions : 5.98 x 0.5 x 9.02 inches
Create an account to read the full story.
The author made this story available to Library Book members only.
If you’re new to Library Book, create a new account to read this story on us.
Already have an account? Sign in
404 View Claps
37 Respond
Save
Listen
Share

Light bulbAdvertise smarter! Our strategic ad space ensures maximum exposure. Reserve your spot today!

Good Author
  • Daniel Knight profile picture
    Daniel Knight
    Follow ·6.4k
  • Javier Bell profile picture
    Javier Bell
    Follow ·10.9k
  • Jackson Hayes profile picture
    Jackson Hayes
    Follow ·15.7k
  • Cormac McCarthy profile picture
    Cormac McCarthy
    Follow ·16.6k
  • Henry Green profile picture
    Henry Green
    Follow ·6.9k
  • Xavier Bell profile picture
    Xavier Bell
    Follow ·11.1k
  • Harry Hayes profile picture
    Harry Hayes
    Follow ·3k
  • Corey Hayes profile picture
    Corey Hayes
    Follow ·3.2k
Recommended from Library Book
The Year They Burned The
Winston Hayes profile pictureWinston Hayes
·4 min read
85 View Claps
20 Respond
Inline Skating Secrets Alexander Iron
Cruz Simmons profile pictureCruz Simmons

Unlock the Secrets of Effortless Inline Skating with...

Discover the Ultimate Guide to Mastering...

·4 min read
438 View Claps
30 Respond
Dove And Sword: A Novel Of Joan Of Arc
Richard Simmons profile pictureRichard Simmons
·4 min read
232 View Claps
27 Respond
The 100 Rules Of Skateboarding Alexander Iron
David Foster Wallace profile pictureDavid Foster Wallace
·5 min read
1.3k View Claps
77 Respond
Lovable Limericks: Mishaps And Mayhem From Around The Corner And Across The World
Jimmy Butler profile pictureJimmy Butler

Mishaps and Mayhem from Around the Corner and Across the...

Life is full of surprises, and not all of...

·4 min read
585 View Claps
61 Respond
Promised Land Alexander Iron
Victor Hugo profile pictureVictor Hugo
·5 min read
197 View Claps
28 Respond
The book was found!
Beginning MLOps with MLFlow: Deploy Models in AWS SageMaker Google Cloud and Microsoft Azure
Beginning MLOps with MLFlow: Deploy Models in AWS SageMaker, Google Cloud, and Microsoft Azure
by I. D. Oro

4.1 out of 5

Language : English
File size : 20154 KB
Text-to-Speech : Enabled
Enhanced typesetting : Enabled
Print length : 346 pages
Screen Reader : Supported
Hardcover : 160 pages
Item Weight : 14.4 ounces
Dimensions : 5.98 x 0.5 x 9.02 inches
Sign up for our newsletter and stay up to date!

By subscribing to our newsletter, you'll receive valuable content straight to your inbox, including informative articles, helpful tips, product launches, and exciting promotions.

By subscribing, you agree with our Privacy Policy.


© 2024 Library Book™ is a registered trademark. All Rights Reserved.