SlideShare a Scribd company logo
1 of 12
Download to read offline
GCP Deployment: Vertex AI
Triloki Gupta
Contents
• Vertex AI
• Workbench/ JupyterLab
• AutoML
• Docker
• Trained Model Deployment
• Flask API Deployment
• Conclusion
Vertex AI
Vertex AI is a managed machine learning platform that helps you build, deploy, and
scale machine learning models faster and easier.
Why Vertex AI?
Ease of use: Vertex AI provides a unified experience for managing all aspects of your
machine learning lifecycle, from data preparation to model deployment. This makes it
easy to get started with machine learning, even if you don't have a lot of experience.
Pre-trained models: Vertex AI offers a variety of pre-trained models that can be used
to quickly build and deploy machine learning models for a variety of use cases. This can
save you time and effort in the development process.
Scalability: Vertex AI is a scalable platform that can easily be scaled up or down to
meet your needs. This means that you can start small and then scale up as your needs
grow.
Security: Vertex AI is a secure platform that meets the highest security standards. This
means that you can be confident that your data is safe.
Workbench/ JupyterLab
Managed notebooks provide JupyterLab services and flexible computing resources
integrated with Google Cloud services more details
User-Managed Notebooks have JupyterLab 3 pre-installed and are configured with
GPU-enabled machine learning frameworks more details
Necessary steps for creating Notebook in Vertex AI more details
• Choose the us-central1 option in Region drop down
• In the Networking section
• Choose the Network shared with me
• Unchecked Enable external IP address
• Checked to Allow proxy access when it's available
Auto ML
• Upload the dataset in the Datasets section
• AutoML steps:
• Select CREATE from Model Registry
• Training method choose Dataset and Objective and Model Training Method as
AutoML
• Pass Name and Target column under Model details
• Training options you can add/remove features
• Compute and Pricing pass the number of nodes
• Deploy to Endpoint
• Pass Endpoint name under Define your endpoint
• Add Machine type under Model settings
• Leave Model monitoring as it is and click on DEPLOY
• Endpoint will be ready in few min
• During the endpoint need to check the Explainability options
Docker
Docker is a software platform that allows you to build, test, and deploy applications
quickly
Docker packages software into standardized units called containers that have
everything the software needs to run including libraries, system tools, code, and
runtime
Basics Docker CMD
• gcloud auth login
• gcloud auth configure-docker us-central1-docker.pkg.dev
• docker build ./ -t my-image
• docker run my-image
• docker tag my-image us-central1-docker.pkg.dev/ford-deeb08c04ecbbaaac14dbfa0/ford-
container-images/test-image:version
• docker push us-central1-docker.pkg.dev/ford-deeb08c04ecbbaaac14dbfa0/ford-container-
images/test--image:version
• For more details Link
Trained Model Deployment
• Deployed with Pre-built container
• Select IMPORT from Model Registry
• Pass Name and region
• Model settings Select a Pre-built container and choose a Model framework
according to the project and pass the model package location in the Model artifact
location
• Deployed with Custom container
• Select CREATE from Model Registry
• Under the Training method choose Dataset as No managed dataset
• Pass Name in Model details
• Training Container select Custom container and choose a container image from the
Artifact registry
• Under Compute and Pricing choose Machine Type according to the project
Flask API Deployment
• Build and Push the docker image in Artifact Registry
• Model Deployment
• From Model Registry click IMPORT
• Pass name and region under the Name and Region section
• Under Model settings choose Import an existing customer container also add
Prediction route(/predict) and Health route(/health)
• Click on IMPORT, the model will be ready in a few min
• Deploy to Endpoint
• Pass Endpoint name under Define your endpoint
• Add Machine type under Model settings
• Leave Model monitoring as it is and click on DEPLOY
• Endpoint will be ready in few min
Custom Deployment: Key Points
• Points need to consider before custom deployment
• HTTP server requires 0.0.0.0 host only
• Require /health API and HTTP server should respond with status code 200 OK
and it should be GET method
• The HTTP server accepts prediction requests in JSON format
• Prediction request must be 1.5 MB or smaller and it has to be written in JSON
• Prediction API should be one API(/predict) with POST method
• Every request must contain an instances field
• The response from the HTTP server is a JSON dictionary with one field
predictions
• Each prediction response must also be 1.5 MB or smaller
Conclusion
• The biggest adv of a custom container is that we can add extra workflow
outside of the ML model
• Compared to the optimized pre-built containers, custom containers are more
difficult to implement and more complex to set up, but it does provide more
flexibility
• Everything except for the core logic of model inference is taken care of by
Vertex AI either service management or auto-scaling
• Considering all these points we can say its basically good for ML model where
we can deploy and predict with one API
• We can’t pass multiple APIs because it seems dedicated to only ML prediction
• Datapoint should be 1k minimum for AutoML
Thank You
Optimization: Vertex AI
• There is an upper limit on the timeout of about the 60s(A major drawback
of Vertex AI) StackOverflow
• With a Standard Machine(2 CPU and 7.5 GB RAM) and CPU TensorFlow env
it runs for 20 iterations
• With a High-memory Machine(16 CPU and 108 GB RAM) and GPU
TensorFlow env, we reached 50 iterations because of timeout
• With a High-GPU Machine(96 CPU and 680 GB RAM) and GPU TensorFlow
env, we reached 70-80 iterations because of timeout
• Sometimes it was failing with a High-memory Machine for 20 iterations

More Related Content

Similar to GCP Deployment- Vertex AI

AWS ML Model Deployment
AWS ML Model DeploymentAWS ML Model Deployment
AWS ML Model DeploymentKnoldus Inc.
 
Canada DevOps Summit 2020 Presentation Nov_03_2020
Canada DevOps Summit 2020 Presentation Nov_03_2020Canada DevOps Summit 2020 Presentation Nov_03_2020
Canada DevOps Summit 2020 Presentation Nov_03_2020Varun Manik
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOpsEklove Mohan
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveBizTalk360
 
Cloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong CodeaholicsCloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong CodeaholicsTaswar Bhatti
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanAmazon Web Services
 
Wellington MuleSoft Meetup 2021-02-18
Wellington MuleSoft Meetup 2021-02-18Wellington MuleSoft Meetup 2021-02-18
Wellington MuleSoft Meetup 2021-02-18Mary Joy Sabal
 
Datasheet was pluginforrd
Datasheet was pluginforrdDatasheet was pluginforrd
Datasheet was pluginforrdMidVision
 
201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019Mark Tabladillo
 
AWS ECS Copilot DevOps Presentation
AWS ECS Copilot DevOps PresentationAWS ECS Copilot DevOps Presentation
AWS ECS Copilot DevOps PresentationVarun Manik
 
Serverless: The future of application delivery
Serverless: The future of application deliveryServerless: The future of application delivery
Serverless: The future of application deliveryDoug Vanderweide
 
Configuration Management in the Cloud | AWS Public Sector Summit 2017
Configuration Management in the Cloud | AWS Public Sector Summit 2017Configuration Management in the Cloud | AWS Public Sector Summit 2017
Configuration Management in the Cloud | AWS Public Sector Summit 2017Amazon Web Services
 
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)Amazon Web Services
 
Jan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationJan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationNordic Infrastructure Conference
 
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup
 
Container Orchestration for .NET Developers
Container Orchestration for .NET DevelopersContainer Orchestration for .NET Developers
Container Orchestration for .NET DevelopersMike Melusky
 
Amazon ECS at Coursera: A unified execution framework while defending against...
Amazon ECS at Coursera: A unified execution framework while defending against...Amazon ECS at Coursera: A unified execution framework while defending against...
Amazon ECS at Coursera: A unified execution framework while defending against...Brennan Saeta
 
(CMP406) Amazon ECS at Coursera: A general-purpose microservice
(CMP406) Amazon ECS at Coursera: A general-purpose microservice(CMP406) Amazon ECS at Coursera: A general-purpose microservice
(CMP406) Amazon ECS at Coursera: A general-purpose microserviceAmazon Web Services
 

Similar to GCP Deployment- Vertex AI (20)

AWS ML Model Deployment
AWS ML Model DeploymentAWS ML Model Deployment
AWS ML Model Deployment
 
Logic appsforbeginners
Logic appsforbeginnersLogic appsforbeginners
Logic appsforbeginners
 
Canada DevOps Summit 2020 Presentation Nov_03_2020
Canada DevOps Summit 2020 Presentation Nov_03_2020Canada DevOps Summit 2020 Presentation Nov_03_2020
Canada DevOps Summit 2020 Presentation Nov_03_2020
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep Dive
 
Diagnosing issues in your ASP.NET applications in production with Visual Stud...
Diagnosing issues in your ASP.NET applications in production with Visual Stud...Diagnosing issues in your ASP.NET applications in production with Visual Stud...
Diagnosing issues in your ASP.NET applications in production with Visual Stud...
 
Cloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong CodeaholicsCloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong Codeaholics
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
 
Wellington MuleSoft Meetup 2021-02-18
Wellington MuleSoft Meetup 2021-02-18Wellington MuleSoft Meetup 2021-02-18
Wellington MuleSoft Meetup 2021-02-18
 
Datasheet was pluginforrd
Datasheet was pluginforrdDatasheet was pluginforrd
Datasheet was pluginforrd
 
201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019
 
AWS ECS Copilot DevOps Presentation
AWS ECS Copilot DevOps PresentationAWS ECS Copilot DevOps Presentation
AWS ECS Copilot DevOps Presentation
 
Serverless: The future of application delivery
Serverless: The future of application deliveryServerless: The future of application delivery
Serverless: The future of application delivery
 
Configuration Management in the Cloud | AWS Public Sector Summit 2017
Configuration Management in the Cloud | AWS Public Sector Summit 2017Configuration Management in the Cloud | AWS Public Sector Summit 2017
Configuration Management in the Cloud | AWS Public Sector Summit 2017
 
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
 
Jan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configurationJan Egil Ring - Get started with windows power shell desired state configuration
Jan Egil Ring - Get started with windows power shell desired state configuration
 
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
 
Container Orchestration for .NET Developers
Container Orchestration for .NET DevelopersContainer Orchestration for .NET Developers
Container Orchestration for .NET Developers
 
Amazon ECS at Coursera: A unified execution framework while defending against...
Amazon ECS at Coursera: A unified execution framework while defending against...Amazon ECS at Coursera: A unified execution framework while defending against...
Amazon ECS at Coursera: A unified execution framework while defending against...
 
(CMP406) Amazon ECS at Coursera: A general-purpose microservice
(CMP406) Amazon ECS at Coursera: A general-purpose microservice(CMP406) Amazon ECS at Coursera: A general-purpose microservice
(CMP406) Amazon ECS at Coursera: A general-purpose microservice
 

More from Triloki Gupta

Speaker identification
Speaker identificationSpeaker identification
Speaker identificationTriloki Gupta
 
Sign Language Recognition based on Hands symbols Classification
Sign Language Recognition based on Hands symbols ClassificationSign Language Recognition based on Hands symbols Classification
Sign Language Recognition based on Hands symbols ClassificationTriloki Gupta
 
Introduction to pig.
Introduction to pig.Introduction to pig.
Introduction to pig.Triloki Gupta
 
Naive Bayes Classifier using R.
Naive Bayes Classifier using R.Naive Bayes Classifier using R.
Naive Bayes Classifier using R.Triloki Gupta
 
Enhancement of Old Images and Documents by Digital Image Processing Techniques.
Enhancement of Old Images and Documents by Digital Image Processing Techniques.Enhancement of Old Images and Documents by Digital Image Processing Techniques.
Enhancement of Old Images and Documents by Digital Image Processing Techniques.Triloki Gupta
 

More from Triloki Gupta (7)

Flask-Python
Flask-PythonFlask-Python
Flask-Python
 
Speaker identification
Speaker identificationSpeaker identification
Speaker identification
 
Sign Language Recognition based on Hands symbols Classification
Sign Language Recognition based on Hands symbols ClassificationSign Language Recognition based on Hands symbols Classification
Sign Language Recognition based on Hands symbols Classification
 
Introduction to pig.
Introduction to pig.Introduction to pig.
Introduction to pig.
 
Naive Bayes Classifier using R.
Naive Bayes Classifier using R.Naive Bayes Classifier using R.
Naive Bayes Classifier using R.
 
Meta analysis.
Meta analysis.Meta analysis.
Meta analysis.
 
Enhancement of Old Images and Documents by Digital Image Processing Techniques.
Enhancement of Old Images and Documents by Digital Image Processing Techniques.Enhancement of Old Images and Documents by Digital Image Processing Techniques.
Enhancement of Old Images and Documents by Digital Image Processing Techniques.
 

Recently uploaded

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 

Recently uploaded (20)

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 

GCP Deployment- Vertex AI

  • 1. GCP Deployment: Vertex AI Triloki Gupta
  • 2. Contents • Vertex AI • Workbench/ JupyterLab • AutoML • Docker • Trained Model Deployment • Flask API Deployment • Conclusion
  • 3. Vertex AI Vertex AI is a managed machine learning platform that helps you build, deploy, and scale machine learning models faster and easier. Why Vertex AI? Ease of use: Vertex AI provides a unified experience for managing all aspects of your machine learning lifecycle, from data preparation to model deployment. This makes it easy to get started with machine learning, even if you don't have a lot of experience. Pre-trained models: Vertex AI offers a variety of pre-trained models that can be used to quickly build and deploy machine learning models for a variety of use cases. This can save you time and effort in the development process. Scalability: Vertex AI is a scalable platform that can easily be scaled up or down to meet your needs. This means that you can start small and then scale up as your needs grow. Security: Vertex AI is a secure platform that meets the highest security standards. This means that you can be confident that your data is safe.
  • 4. Workbench/ JupyterLab Managed notebooks provide JupyterLab services and flexible computing resources integrated with Google Cloud services more details User-Managed Notebooks have JupyterLab 3 pre-installed and are configured with GPU-enabled machine learning frameworks more details Necessary steps for creating Notebook in Vertex AI more details • Choose the us-central1 option in Region drop down • In the Networking section • Choose the Network shared with me • Unchecked Enable external IP address • Checked to Allow proxy access when it's available
  • 5. Auto ML • Upload the dataset in the Datasets section • AutoML steps: • Select CREATE from Model Registry • Training method choose Dataset and Objective and Model Training Method as AutoML • Pass Name and Target column under Model details • Training options you can add/remove features • Compute and Pricing pass the number of nodes • Deploy to Endpoint • Pass Endpoint name under Define your endpoint • Add Machine type under Model settings • Leave Model monitoring as it is and click on DEPLOY • Endpoint will be ready in few min • During the endpoint need to check the Explainability options
  • 6. Docker Docker is a software platform that allows you to build, test, and deploy applications quickly Docker packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code, and runtime Basics Docker CMD • gcloud auth login • gcloud auth configure-docker us-central1-docker.pkg.dev • docker build ./ -t my-image • docker run my-image • docker tag my-image us-central1-docker.pkg.dev/ford-deeb08c04ecbbaaac14dbfa0/ford- container-images/test-image:version • docker push us-central1-docker.pkg.dev/ford-deeb08c04ecbbaaac14dbfa0/ford-container- images/test--image:version • For more details Link
  • 7. Trained Model Deployment • Deployed with Pre-built container • Select IMPORT from Model Registry • Pass Name and region • Model settings Select a Pre-built container and choose a Model framework according to the project and pass the model package location in the Model artifact location • Deployed with Custom container • Select CREATE from Model Registry • Under the Training method choose Dataset as No managed dataset • Pass Name in Model details • Training Container select Custom container and choose a container image from the Artifact registry • Under Compute and Pricing choose Machine Type according to the project
  • 8. Flask API Deployment • Build and Push the docker image in Artifact Registry • Model Deployment • From Model Registry click IMPORT • Pass name and region under the Name and Region section • Under Model settings choose Import an existing customer container also add Prediction route(/predict) and Health route(/health) • Click on IMPORT, the model will be ready in a few min • Deploy to Endpoint • Pass Endpoint name under Define your endpoint • Add Machine type under Model settings • Leave Model monitoring as it is and click on DEPLOY • Endpoint will be ready in few min
  • 9. Custom Deployment: Key Points • Points need to consider before custom deployment • HTTP server requires 0.0.0.0 host only • Require /health API and HTTP server should respond with status code 200 OK and it should be GET method • The HTTP server accepts prediction requests in JSON format • Prediction request must be 1.5 MB or smaller and it has to be written in JSON • Prediction API should be one API(/predict) with POST method • Every request must contain an instances field • The response from the HTTP server is a JSON dictionary with one field predictions • Each prediction response must also be 1.5 MB or smaller
  • 10. Conclusion • The biggest adv of a custom container is that we can add extra workflow outside of the ML model • Compared to the optimized pre-built containers, custom containers are more difficult to implement and more complex to set up, but it does provide more flexibility • Everything except for the core logic of model inference is taken care of by Vertex AI either service management or auto-scaling • Considering all these points we can say its basically good for ML model where we can deploy and predict with one API • We can’t pass multiple APIs because it seems dedicated to only ML prediction • Datapoint should be 1k minimum for AutoML
  • 12. Optimization: Vertex AI • There is an upper limit on the timeout of about the 60s(A major drawback of Vertex AI) StackOverflow • With a Standard Machine(2 CPU and 7.5 GB RAM) and CPU TensorFlow env it runs for 20 iterations • With a High-memory Machine(16 CPU and 108 GB RAM) and GPU TensorFlow env, we reached 50 iterations because of timeout • With a High-GPU Machine(96 CPU and 680 GB RAM) and GPU TensorFlow env, we reached 70-80 iterations because of timeout • Sometimes it was failing with a High-memory Machine for 20 iterations