SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
KFServing and Feast
Animesh Singh
The InferenceService architecture consists of a static graph of components which coordinate
requests for a single model. Advanced features such as Ensembling, A/B testing, and Multi-Arm-
Bandits should compose InferenceServices together.
Inference Service Control Plane
Inference Service with Transformer
apiVersion: serving.kubeflow.org/v1alpha2
kind: InferenceService
metadata:
name: bert-serving
spec:
default
transformer:
custom:
container:
image: bert-transformer:v1
env:
name: STORAGE_URI
value: s3://examples/bert_transformer
predictor:
pytorch:
storageUri: s3://examples/bert
runtimeVersion: v0.3.0-gpu
resources:
limits:
nvidia.com/gpu: 1 Pytorch Model Server
apiVersion: serving.kubeflow.org/v1alpha2
kind: InferenceService
metadata:
name: bert-serving-onnx
spec:
default
transformer:
custom:
container:
image: bert-transformer:v1
env:
name: STORAGE_URI
value: s3://examples/bert_transformer
predictor:
onnx:
storageUri: s3://examples/bert
runtimeVersion: 0.5.1
Pre/Post Processing
ONNX Runtime Server
Pre/Post Processing
Feature
● What is a feature?
4
/feature/
A feature is a measurable property of the object you’re trying to analyze.
Features are the basic building blocks of models. The
quality of the features in your dataset has a major impact
on the quality of the insights you will gain when you use
that dataset for machine learning.
Importance of Features
Hidden Technical Debt in Machine Learning Systems
5
Tech/User
Trends
Coming up with features is difficult, time-consuming,
requires expert knowledge. "Applied machine
learning" is basically feature engineering.
- Andrew Ng, Founder of deeplearning.ai
...some machine learning projects succeed and
some fail. What makes the difference? Easily the
most important factor is the features used.
- Pedro Domingos, author of ‘The Master Algorithm
algorithms we used are very standard for Kagglers. […]
We spent most of our efforts in feature engineering.
[...]
- Xavier Conort, Chief Data Scientist DataRobot
Feature Engineering is essential, difficult, and costly
The Feature problem
● Different ML models typically use some common set of features
● Examples of common features:
○ Average Loan default rate by zip code: Used by models which predict who should be targeted for a marketing offer, models which predict who should be offered a loan, etc.
○ Average property prices in an area
○ Credit history of customers: Used by models which predict anything that is related to clients.
○ Average traffic in an area: Used by models which deal with finding best route
● Finding the right features for an ML models requires:
○ Thinking of which features will be relevant for building the model
○ Identifying the right data from the data catalog/data lake for building the feature
○ Feature engineering to get the feature in the right format from the source data
○ This is repeated across teams by data scientists!
7
Feature Management is a Huge Painpoint
Spend more time on data prep
Lack of data consistency between training and serving
Duplicate work because they do not know it exists
Manage fragmented data infrastructure
Deal with more request as the data science team scales
Hard to get features into production
Data Scientists
Data Engineer
● Poor Feature Management Leads to….
8
Long Development Time Poor Data Quality Difficulty in Production
The feature store is the central
place to store curated features
for machine learning pipelines.
F E A T U R E S T O R E
Feature Store
9
Feast is a Feature Store Catalog that
attempts to solve the key data
challenges with production machine
learning
FEAST
Feature stores are a critical piece of ML infra
‘17 Uber Michelangelo (Proprietary, original feature store)
‘18 Feast (Open source)
‘18 Logical Clocks (Open source, ML platform)
‘19 Airbnb’s Zipline (Closed source)
‘19 Spotify’s Feature Store on Kubeflow (Closed source)
‘20 Pinterest (Closed source)
‘20 Twitter Feature Store (Closed source, library based)
‘20 Tecton Feature Store (Closed source)
What is a Feature Catalog?
● Feature catalog can be thought of as “Master Data” which is used for building and serving Machine learning models
● It stores different features which can be used across different teams for building ML models
● It is not just a feature repository, but also includes two serving mechanisms for:
○ Batch access
○ Real time access
● Feature Update: Feature values will get updated over time
○ Some will be updated in real time. E.g., average traffic in an area
○ Some will be updated not very frequently. E.g., Credit rating of customer
○ Features need to be synced between repositories used for batch access and real time access.
What does Feast provide?
Registry: A common catalog with which to explore, develop, collaborate on, and publish new feature definitions within
and across teams.
Ingestion: A means for continually ingesting batch and streaming data and storing consistent copies in both an offline
and online store
Serving: A feature-retrieval interface which provides a temporally consistent view of features for both training and online
serving.
Monitoring: Tools that allow operational teams to monitor and act on the quality and accuracy of data reaching models.
Feature Repo feast apply
Redis Serving API
Ingestion
API
Offline Store
(BQ/S3/GCS/Other)
Kafka Spark on K8s
Spark on K8s
Configures infrastructure based on feature definitions
and “provider”
Feast on K8s
Exists
Planning phase
TBD what the scope of apply would be for an K8s provider. It may be that it only spins up jobs and updates stores.
GCS/S3
registry
Redis Serving API
Feast- KFS
Feast online Serving
• gRPC server
• Serves 2 Methods
• GetFeastServingInfo
• GetOnlineFeaturesV2
• How to call the gRPC server-side methods?
• Short answer: Feast SDK
• Feast Python SDK, (also in Java and Go) wraps around gRPC client libs.
• gRPC client libs calls gRPC server-side method like calling local methods.
• gRPC client libs are generated from protobuf definition
• How are python gPRC client libs (modules) generated?
• They are generated from *.proto - Example:
python -m grpc_tools.protoc -I.
--grpc_python_out=../sdk/python/feast/protos/
--python_out=../sdk/python/feast/protos/
--mypy_out=../sdk/python/feast/protos/
feast/serving/ServingService.proto
• Generates
ServingService_pb2_grpc.py: client stub. Wrapper around the ServingService_pb.py
ServingService_pb.py - Implementation of ServingService_pb2_grpc.py
ServingService_pb2.pyi - Stub (interface) file of ServingService_pb2.py
Extend the Transformer
apiVersion: serving.kubeflow.org/v1alpha2
kind: InferenceService
metadata:
name: bert-serving
spec:
default
transformer:
feast:
feastUrl: "http://feast-serving.default.svc"
dataType: TensorProto,
entityIds:
- source
featureIds:
- weather:1:temp
- weather:1:clouds
- weather:1:humidity
numFeatureValues: 5
predictor:
pytorch:
storageUri: s3://examples/bert
runtimeVersion: v0.3.0-gpu
resources:
limits:
nvidia.com/gpu: 1
Pytorch Model Server
Feast Transformer
KFServing with Feast
Feast transformer as a new type of transformer for preprocess
○ Has a custom container image with generic implementation to interact with Feast online serving
○ Properties: entity IDs, feature refs, project, Feast serving URL…
○ Specify IDs in inference service yaml
■ Entity ids è FeatureStore.get_online_features(entity_rows…)
■ Feature refs è FeatureStore.get_online_features(feature_refs…)
○ The initial request will be augmented with features from Feast online store and sent to predictor as the final input
○ Postprocess is a pass-through, not implemented in this transformer
Preprocess Predict Postprocess
Explain
Python
dict
Python
dict
Transformer Transformer
Predictor
Explainer
Feast Online Serving
Model Serving
Request (predict
or explain)
Online Store
(Redis)
Registry
Feast
Model Serving
Response
(predict or
explain)
Python, gRPC
KFServing with Feast – Phased Approach
Phase 1: Provide a sample Feast transformer
○ Illustrate how online features in Feast feature stores can be retrieved and used for model serving
○ As a sample in KFServing docs folder
○ Use the driver ranking data and model from Feast tutorial, https://github.com/feast-dev/feast-
driver-ranking-tutorial
○ Use a custom container image
○ Interact with Feast online serving via python API
Phase 2: Provide a generic Feast transformer
○ Support a variety of Feast feature stores in preprocessing and model serving
○ As a general transformer in KFServing python folder
○ Include test, instructions, and examples
○ Provide a common Feast base image
○ Interact with Feast online serving via gRPC API
Where can it go?
Better precision
21
Data Asset 1
Model 1
(poor quality)
Data Asset 2
Model 2
(poor quality)
Data Asset 3
Model 3
(poor quality)
Difficult to identify the features
the lead to poor quality models
Feature
Better precision
22
Feature 1
Poor Quality Feature
Store
Model 2
(poor quality)
Model 3
(poor quality)
Model 4
(Good quality)
Feature 2
Moderate Quality
Model 1
(poor quality)
• Feature 1 – Used in 3
models all have poor quality
• Feature 2 – Used in 2
models which have good +
poor quality
• Feature 3 – Used in 1 model
with good quality
Easy to identify feature quality

Contenu connexe

Tendances

Tendances (20)

Advanced Model Inferencing leveraging Kubeflow Serving, KNative and Istio
Advanced Model Inferencing leveraging Kubeflow Serving, KNative and IstioAdvanced Model Inferencing leveraging Kubeflow Serving, KNative and Istio
Advanced Model Inferencing leveraging Kubeflow Serving, KNative and Istio
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database System
 
A Deep Dive into Stateful Stream Processing in Structured Streaming with Tath...
A Deep Dive into Stateful Stream Processing in Structured Streaming with Tath...A Deep Dive into Stateful Stream Processing in Structured Streaming with Tath...
A Deep Dive into Stateful Stream Processing in Structured Streaming with Tath...
 
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
 
Native Support of Prometheus Monitoring in Apache Spark 3.0
Native Support of Prometheus Monitoring in Apache Spark 3.0Native Support of Prometheus Monitoring in Apache Spark 3.0
Native Support of Prometheus Monitoring in Apache Spark 3.0
 
HDFS on Kubernetes—Lessons Learned with Kimoon Kim
HDFS on Kubernetes—Lessons Learned with Kimoon KimHDFS on Kubernetes—Lessons Learned with Kimoon Kim
HDFS on Kubernetes—Lessons Learned with Kimoon Kim
 
Evening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in FlinkEvening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in Flink
 
Microservices Integration Patterns with Kafka
Microservices Integration Patterns with KafkaMicroservices Integration Patterns with Kafka
Microservices Integration Patterns with Kafka
 
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
 
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
 
Apache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native EraApache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native Era
 
What is Apache Kafka and What is an Event Streaming Platform?
What is Apache Kafka and What is an Event Streaming Platform?What is Apache Kafka and What is an Event Streaming Platform?
What is Apache Kafka and What is an Event Streaming Platform?
 
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
 
Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive Mode
 
Performance Tuning RocksDB for Kafka Streams’ State Stores
Performance Tuning RocksDB for Kafka Streams’ State StoresPerformance Tuning RocksDB for Kafka Streams’ State Stores
Performance Tuning RocksDB for Kafka Streams’ State Stores
 
Tuning Apache Kafka Connectors for Flink.pptx
Tuning Apache Kafka Connectors for Flink.pptxTuning Apache Kafka Connectors for Flink.pptx
Tuning Apache Kafka Connectors for Flink.pptx
 
Webinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin Knauf
Webinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin KnaufWebinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin Knauf
Webinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin Knauf
 
Running Apache Spark on Kubernetes: Best Practices and Pitfalls
Running Apache Spark on Kubernetes: Best Practices and PitfallsRunning Apache Spark on Kubernetes: Best Practices and Pitfalls
Running Apache Spark on Kubernetes: Best Practices and Pitfalls
 
KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...
KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...
KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...
 
Apache Flink Adoption @ Shopify
Apache Flink Adoption @ ShopifyApache Flink Adoption @ Shopify
Apache Flink Adoption @ Shopify
 

Similaire à KFServing and Feast

MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
 MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ... MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
Databricks
 
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
Databricks
 

Similaire à KFServing and Feast (20)

Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019
 
ML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning Infrastructure
ML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning InfrastructureML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning Infrastructure
ML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning Infrastructure
 
MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
 MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ... MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
 
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the DatacenterKubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the Datacenter
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
 
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerSpinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
 
API workshop by AWS and 3scale
API workshop by AWS and 3scaleAPI workshop by AWS and 3scale
API workshop by AWS and 3scale
 
Data collection in AWS at Schibsted
Data collection in AWS at SchibstedData collection in AWS at Schibsted
Data collection in AWS at Schibsted
 
Seattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp APISeattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp API
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
from ai.backend import python @ pycontw2018
from ai.backend import python @ pycontw2018from ai.backend import python @ pycontw2018
from ai.backend import python @ pycontw2018
 
Ml ops and the feature store with hopsworks, DC Data Science Meetup
Ml ops and the feature store with hopsworks, DC Data Science MeetupMl ops and the feature store with hopsworks, DC Data Science Meetup
Ml ops and the feature store with hopsworks, DC Data Science Meetup
 
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUpStrimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
 
AI & Machine Learning Pipelines with Knative
AI & Machine Learning Pipelines with KnativeAI & Machine Learning Pipelines with Knative
AI & Machine Learning Pipelines with Knative
 
Mulesoft lisbon_meetup_asyncapis
Mulesoft lisbon_meetup_asyncapisMulesoft lisbon_meetup_asyncapis
Mulesoft lisbon_meetup_asyncapis
 
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and Practices
 
KFServing Payload Logging for Trusted AI
KFServing Payload Logging for Trusted AIKFServing Payload Logging for Trusted AI
KFServing Payload Logging for Trusted AI
 
Apache Flink Adoption at Shopify
Apache Flink Adoption at ShopifyApache Flink Adoption at Shopify
Apache Flink Adoption at Shopify
 

Plus de Animesh Singh

Building a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStackBuilding a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStack
Animesh Singh
 

Plus de Animesh Singh (20)

Machine Learning Exchange (MLX)
Machine Learning Exchange (MLX)Machine Learning Exchange (MLX)
Machine Learning Exchange (MLX)
 
KFServing and Kubeflow Pipelines
KFServing and Kubeflow PipelinesKFServing and Kubeflow Pipelines
KFServing and Kubeflow Pipelines
 
Kubeflow Distributed Training and HPO
Kubeflow Distributed Training and HPOKubeflow Distributed Training and HPO
Kubeflow Distributed Training and HPO
 
Kubeflow Pipelines (with Tekton)
Kubeflow Pipelines (with Tekton)Kubeflow Pipelines (with Tekton)
Kubeflow Pipelines (with Tekton)
 
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and ManageEnd to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
 
Defend against adversarial AI using Adversarial Robustness Toolbox
Defend against adversarial AI using Adversarial Robustness Toolbox Defend against adversarial AI using Adversarial Robustness Toolbox
Defend against adversarial AI using Adversarial Robustness Toolbox
 
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
 
Trusted, Transparent and Fair AI using Open Source
Trusted, Transparent and Fair AI using Open SourceTrusted, Transparent and Fair AI using Open Source
Trusted, Transparent and Fair AI using Open Source
 
AIF360 - Trusted and Fair AI
AIF360 - Trusted and Fair AIAIF360 - Trusted and Fair AI
AIF360 - Trusted and Fair AI
 
Fabric for Deep Learning
Fabric for Deep LearningFabric for Deep Learning
Fabric for Deep Learning
 
Microservices, Kubernetes and Istio - A Great Fit!
Microservices, Kubernetes and Istio - A Great Fit!Microservices, Kubernetes and Istio - A Great Fit!
Microservices, Kubernetes and Istio - A Great Fit!
 
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
 
How to build an event-driven, polyglot serverless microservices framework on ...
How to build an event-driven, polyglot serverless microservices framework on ...How to build an event-driven, polyglot serverless microservices framework on ...
How to build an event-driven, polyglot serverless microservices framework on ...
 
As a Service: Cloud Foundry on OpenStack - Lessons Learnt
As a Service: Cloud Foundry on OpenStack - Lessons LearntAs a Service: Cloud Foundry on OpenStack - Lessons Learnt
As a Service: Cloud Foundry on OpenStack - Lessons Learnt
 
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
 
Finding and-organizing Great Cloud Foundry User Groups
Finding and-organizing Great Cloud Foundry User GroupsFinding and-organizing Great Cloud Foundry User Groups
Finding and-organizing Great Cloud Foundry User Groups
 
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
 
Building a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStackBuilding a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStack
 
Cloud foundry Docker Openstack - Leading Open Source Triumvirate
Cloud foundry Docker Openstack - Leading Open Source TriumvirateCloud foundry Docker Openstack - Leading Open Source Triumvirate
Cloud foundry Docker Openstack - Leading Open Source Triumvirate
 
Build Scalable Internet of Things Apps using Cloud Foundry, Bluemix & Cloudant
Build Scalable Internet of Things Apps using Cloud Foundry, Bluemix & CloudantBuild Scalable Internet of Things Apps using Cloud Foundry, Bluemix & Cloudant
Build Scalable Internet of Things Apps using Cloud Foundry, Bluemix & Cloudant
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

KFServing and Feast

  • 2. The InferenceService architecture consists of a static graph of components which coordinate requests for a single model. Advanced features such as Ensembling, A/B testing, and Multi-Arm- Bandits should compose InferenceServices together. Inference Service Control Plane
  • 3. Inference Service with Transformer apiVersion: serving.kubeflow.org/v1alpha2 kind: InferenceService metadata: name: bert-serving spec: default transformer: custom: container: image: bert-transformer:v1 env: name: STORAGE_URI value: s3://examples/bert_transformer predictor: pytorch: storageUri: s3://examples/bert runtimeVersion: v0.3.0-gpu resources: limits: nvidia.com/gpu: 1 Pytorch Model Server apiVersion: serving.kubeflow.org/v1alpha2 kind: InferenceService metadata: name: bert-serving-onnx spec: default transformer: custom: container: image: bert-transformer:v1 env: name: STORAGE_URI value: s3://examples/bert_transformer predictor: onnx: storageUri: s3://examples/bert runtimeVersion: 0.5.1 Pre/Post Processing ONNX Runtime Server Pre/Post Processing
  • 4. Feature ● What is a feature? 4 /feature/ A feature is a measurable property of the object you’re trying to analyze. Features are the basic building blocks of models. The quality of the features in your dataset has a major impact on the quality of the insights you will gain when you use that dataset for machine learning. Importance of Features
  • 5. Hidden Technical Debt in Machine Learning Systems 5 Tech/User Trends Coming up with features is difficult, time-consuming, requires expert knowledge. "Applied machine learning" is basically feature engineering. - Andrew Ng, Founder of deeplearning.ai ...some machine learning projects succeed and some fail. What makes the difference? Easily the most important factor is the features used. - Pedro Domingos, author of ‘The Master Algorithm algorithms we used are very standard for Kagglers. […] We spent most of our efforts in feature engineering. [...] - Xavier Conort, Chief Data Scientist DataRobot Feature Engineering is essential, difficult, and costly
  • 6. The Feature problem ● Different ML models typically use some common set of features ● Examples of common features: ○ Average Loan default rate by zip code: Used by models which predict who should be targeted for a marketing offer, models which predict who should be offered a loan, etc. ○ Average property prices in an area ○ Credit history of customers: Used by models which predict anything that is related to clients. ○ Average traffic in an area: Used by models which deal with finding best route ● Finding the right features for an ML models requires: ○ Thinking of which features will be relevant for building the model ○ Identifying the right data from the data catalog/data lake for building the feature ○ Feature engineering to get the feature in the right format from the source data ○ This is repeated across teams by data scientists!
  • 7. 7 Feature Management is a Huge Painpoint Spend more time on data prep Lack of data consistency between training and serving Duplicate work because they do not know it exists Manage fragmented data infrastructure Deal with more request as the data science team scales Hard to get features into production Data Scientists Data Engineer
  • 8. ● Poor Feature Management Leads to…. 8 Long Development Time Poor Data Quality Difficulty in Production
  • 9. The feature store is the central place to store curated features for machine learning pipelines. F E A T U R E S T O R E Feature Store 9
  • 10. Feast is a Feature Store Catalog that attempts to solve the key data challenges with production machine learning FEAST
  • 11. Feature stores are a critical piece of ML infra ‘17 Uber Michelangelo (Proprietary, original feature store) ‘18 Feast (Open source) ‘18 Logical Clocks (Open source, ML platform) ‘19 Airbnb’s Zipline (Closed source) ‘19 Spotify’s Feature Store on Kubeflow (Closed source) ‘20 Pinterest (Closed source) ‘20 Twitter Feature Store (Closed source, library based) ‘20 Tecton Feature Store (Closed source)
  • 12. What is a Feature Catalog? ● Feature catalog can be thought of as “Master Data” which is used for building and serving Machine learning models ● It stores different features which can be used across different teams for building ML models ● It is not just a feature repository, but also includes two serving mechanisms for: ○ Batch access ○ Real time access ● Feature Update: Feature values will get updated over time ○ Some will be updated in real time. E.g., average traffic in an area ○ Some will be updated not very frequently. E.g., Credit rating of customer ○ Features need to be synced between repositories used for batch access and real time access.
  • 13. What does Feast provide? Registry: A common catalog with which to explore, develop, collaborate on, and publish new feature definitions within and across teams. Ingestion: A means for continually ingesting batch and streaming data and storing consistent copies in both an offline and online store Serving: A feature-retrieval interface which provides a temporally consistent view of features for both training and online serving. Monitoring: Tools that allow operational teams to monitor and act on the quality and accuracy of data reaching models.
  • 14. Feature Repo feast apply Redis Serving API Ingestion API Offline Store (BQ/S3/GCS/Other) Kafka Spark on K8s Spark on K8s Configures infrastructure based on feature definitions and “provider” Feast on K8s Exists Planning phase TBD what the scope of apply would be for an K8s provider. It may be that it only spins up jobs and updates stores. GCS/S3 registry
  • 16. Feast online Serving • gRPC server • Serves 2 Methods • GetFeastServingInfo • GetOnlineFeaturesV2 • How to call the gRPC server-side methods? • Short answer: Feast SDK • Feast Python SDK, (also in Java and Go) wraps around gRPC client libs. • gRPC client libs calls gRPC server-side method like calling local methods. • gRPC client libs are generated from protobuf definition • How are python gPRC client libs (modules) generated? • They are generated from *.proto - Example: python -m grpc_tools.protoc -I. --grpc_python_out=../sdk/python/feast/protos/ --python_out=../sdk/python/feast/protos/ --mypy_out=../sdk/python/feast/protos/ feast/serving/ServingService.proto • Generates ServingService_pb2_grpc.py: client stub. Wrapper around the ServingService_pb.py ServingService_pb.py - Implementation of ServingService_pb2_grpc.py ServingService_pb2.pyi - Stub (interface) file of ServingService_pb2.py
  • 17. Extend the Transformer apiVersion: serving.kubeflow.org/v1alpha2 kind: InferenceService metadata: name: bert-serving spec: default transformer: feast: feastUrl: "http://feast-serving.default.svc" dataType: TensorProto, entityIds: - source featureIds: - weather:1:temp - weather:1:clouds - weather:1:humidity numFeatureValues: 5 predictor: pytorch: storageUri: s3://examples/bert runtimeVersion: v0.3.0-gpu resources: limits: nvidia.com/gpu: 1 Pytorch Model Server Feast Transformer
  • 18. KFServing with Feast Feast transformer as a new type of transformer for preprocess ○ Has a custom container image with generic implementation to interact with Feast online serving ○ Properties: entity IDs, feature refs, project, Feast serving URL… ○ Specify IDs in inference service yaml ■ Entity ids è FeatureStore.get_online_features(entity_rows…) ■ Feature refs è FeatureStore.get_online_features(feature_refs…) ○ The initial request will be augmented with features from Feast online store and sent to predictor as the final input ○ Postprocess is a pass-through, not implemented in this transformer Preprocess Predict Postprocess Explain Python dict Python dict Transformer Transformer Predictor Explainer Feast Online Serving Model Serving Request (predict or explain) Online Store (Redis) Registry Feast Model Serving Response (predict or explain) Python, gRPC
  • 19. KFServing with Feast – Phased Approach Phase 1: Provide a sample Feast transformer ○ Illustrate how online features in Feast feature stores can be retrieved and used for model serving ○ As a sample in KFServing docs folder ○ Use the driver ranking data and model from Feast tutorial, https://github.com/feast-dev/feast- driver-ranking-tutorial ○ Use a custom container image ○ Interact with Feast online serving via python API Phase 2: Provide a generic Feast transformer ○ Support a variety of Feast feature stores in preprocessing and model serving ○ As a general transformer in KFServing python folder ○ Include test, instructions, and examples ○ Provide a common Feast base image ○ Interact with Feast online serving via gRPC API
  • 21. Better precision 21 Data Asset 1 Model 1 (poor quality) Data Asset 2 Model 2 (poor quality) Data Asset 3 Model 3 (poor quality) Difficult to identify the features the lead to poor quality models Feature
  • 22. Better precision 22 Feature 1 Poor Quality Feature Store Model 2 (poor quality) Model 3 (poor quality) Model 4 (Good quality) Feature 2 Moderate Quality Model 1 (poor quality) • Feature 1 – Used in 3 models all have poor quality • Feature 2 – Used in 2 models which have good + poor quality • Feature 3 – Used in 1 model with good quality Easy to identify feature quality