SlideShare a Scribd company logo
1 of 27
From Training to Explainability via GitOps
Kubeflow Contributor Summit
October 2019
Outline
- Background: What Customers want from Kubeflow
- Time to value
- Governance
- How best to get to live predictions?
- GitOps - why and how
- Pipeline to serving walkthrough with
- Oversight
- Observability
- Explainability
What Customers want from an ML Platform
Empowerment/Time to value
● Self-service for data science
● DS & Ops collaboration
● Sandboxing
● Repeatable approaches
Governance
● Visibility and oversight of running models
● Detailed monitoring
● Audit trails
● Access control
● Repeatable approaches
● Explainability
Kubeflow ticks these boxes!
Kubeflow for Collaboration
- Jupyter
- Collaboration
- Sandboxing (inc fairing)
- Share repeatable approaches
- Pipelines
- Data science and Ops collaboration
- Repeatable approaches
- Audit Trails (governance)
Kubeflow for Governance
- Metadata/Artifact Management
- Track what produced when and how
- Multi User Isolation
- Control who can do what
Path to Live Serving
Those features aimed at exploration and training
Multiple paths to serving (live predictions) with kubeflow.
How best to get from training to serving?
How do we get to serving with empowerment and governance?
GitOps for Live Serving
● Cluster state represented declaratively
● ArgoCD/Flux/Jenkins-X
● Audit trails and reverts
● Git permissions
● Favourite with Ops
Ok to push to cluster for sandboxing.
GitOps great option for prod… but how best to do it?
From Experimentation To
Explainability
Example with GitOps
The scenario
● Classify income (as high or low) based on US Census features incl. age,
gender, race, marital status
● Train a scikit-learn classifier
● Deploy from kubeflow pipeline via GitOps
● Serve requests with Seldon
● Deploy alibi explainer and explain predictions
Build Model
- Model is income classifier
- Build alibi explainer together with model
# train an RF model
np.random.seed(0)
clf = RandomForestClassifier(n_estimators=50)
#clf.fit(preprocessor.transform(X_train), Y_train)
pipeline = Pipeline([('preprocessor', preprocessor),
('clf', clf)])
pipeline.fit(X_train, Y_train)
print(X_train.shape)
print(pipeline.predict(X_train[0:1]))
print("Creating an explainer")
predict_fn = lambda x: pipeline.predict_proba(x)
predict_fn(X_train[0:1])
predict_fn(np.zeros([1, len(feature_names)]))
explainer = alibi.explainers.AnchorTabular(predict_fn=predict_fn,
feature_names=feature_names,
categorical_names=category_map)
explainer.fit(X_train)
explainer.predict_fn = None # Clear explainer predict_fn as its a lambda and will be reset when loaded
with open("explainer.dill", 'wb') as f:
dill.dump(explainer,f)
Seldon GitOps Serving apiVersion: machinelearning.seldon.io/v1alpha2
kind: SeldonDeployment
metadata:
name: sklearn
spec:
name: iris
predictors:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
name: classifier
name: default
replicas: 1
Model in storage bucket
Manifest in Git
KFServing too
Kubeflow Pipeline
GitOps from Pipeline
@dsl.pipeline(
name="Serving gitops",
description="Example of pushing to git from pipeline"
)
#Example to show how serving yaml can be pushed to git
def
serve_gitops(user='ryandawsonuk',email='rd@seldon.io',git_token='xxxxxxxxxx',file='https://raw.githubusercontent.com/ryandawsonuk/seldon_gitop
s_repo_old1/master/default/SeldonDeployment-income-classifier2.json',filename='SeldonDeployment-income-classifier2.json'):
#push file to serving repo
push = dsl.ContainerOp(
name="push",
image="alpine/git:latest",
command=["sh", "-c"],
arguments=["git config --global url.'https://"+str(git_token)+":@github.com/'.insteadOf 'https://github.com/'; wget "+str(file)+"; git
config --global user.name '"+str(user)+"'; git config --global user.email "+str(email)+"; git clone https://github.com/"+str(user)+"/seldon-
gitops; ls; cp "+str(filename)+" ./seldon-gitops/default/"+str(filename)+"; cd ./seldon-gitops/; git add .; git commit -m 'add
"+str(filename)+"'; git push -u origin master;"]
)
GitOps for Serving
● Great for Data Science and Ops Collaboration
GitOps and Namespaces
Observability
Now we know what’s running…
So what is it doing?
Metrics Visibility
Metrics In Action
Sidenote: Access Control
Can’t have metrics without requests
Access from curl or Seldon UI predict/load-test
If you don’t have an existing auth preference we like...
Explainability
So now we know what it’s doing…
Why is it doing that?
Request Logging
To ask why, need to first know what happened
Explainer Deployment
apiVersion: machinelearning.seldon.io/v1alpha2
kind: SeldonDeployment
metadata:
name: income
spec:
name: income
predictors:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/income/model
name: classifier
explainer:
type: anchor_tabular
modelUri: gs://seldon-models/sklearn/income/explainer
name: default
replicas: 1
Declarative yaml
Wizards for time to value & sandboxing
Alibi Explainers
- Includes techniques for black-box models
- We’ll use anchors for tabular data
- Anchors are sufficient conditions to ensure a certain prediction
- As long as the anchor holds, the prediction should remain the same
regardless of the values of the other features
- Anchors are chosen to maximise the range for which the prediction holds
Alibi Explanations
Predict-Explain Flow
Wrap-up
● What Seldon Customers want
○ Time to value
○ Governance
● GitOps helps with both
● Pipeline to serving walkthrough with
○ Oversight
○ Observability
○ Explainability
The Future
Very excited about:
● Metadata integrations
● Permissions
● KFServing and MLGraph

More Related Content

What's hot

A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CDA GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CDJulian Mazzitelli
 
GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)Weaveworks
 
DevOps: The Future of Software Development
DevOps: The Future of Software DevelopmentDevOps: The Future of Software Development
DevOps: The Future of Software DevelopmentOpsta
 
Cloud Native CI/CD with GitOps
Cloud Native CI/CD with GitOpsCloud Native CI/CD with GitOps
Cloud Native CI/CD with GitOpsKasper Nissen
 
The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitWeaveworks
 
Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)Shift Conference
 
Git ops: Git based application deployment patterns for Kubernetes
Git ops: Git based application deployment patterns for KubernetesGit ops: Git based application deployment patterns for Kubernetes
Git ops: Git based application deployment patterns for KubernetesShahidh K Muhammed
 
From airflow to google cloud composer
From airflow to google cloud composerFrom airflow to google cloud composer
From airflow to google cloud composerBruce Kuo
 
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)DataWorks Summit
 
Lessons learned from the charts repo
Lessons learned from the charts repoLessons learned from the charts repo
Lessons learned from the charts repoVictor Iglesias
 
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019UA DevOps Conference
 
Helm at reddit: from local dev, staging, to production
Helm at reddit: from local dev, staging, to productionHelm at reddit: from local dev, staging, to production
Helm at reddit: from local dev, staging, to productionGregory Taylor
 
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...Bitnami
 
GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyWeaveworks
 
GitOps - Operation By Pull Request
GitOps - Operation By Pull RequestGitOps - Operation By Pull Request
GitOps - Operation By Pull RequestKasper Nissen
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiVMware Tanzu
 

What's hot (20)

A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CDA GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
 
GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)
 
DevOps: The Future of Software Development
DevOps: The Future of Software DevelopmentDevOps: The Future of Software Development
DevOps: The Future of Software Development
 
Cloud Native CI/CD with GitOps
Cloud Native CI/CD with GitOpsCloud Native CI/CD with GitOps
Cloud Native CI/CD with GitOps
 
GitOps with Gitkube
GitOps with GitkubeGitOps with Gitkube
GitOps with Gitkube
 
The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
 
Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)
 
Git ops: Git based application deployment patterns for Kubernetes
Git ops: Git based application deployment patterns for KubernetesGit ops: Git based application deployment patterns for Kubernetes
Git ops: Git based application deployment patterns for Kubernetes
 
From airflow to google cloud composer
From airflow to google cloud composerFrom airflow to google cloud composer
From airflow to google cloud composer
 
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)
 
Lessons learned from the charts repo
Lessons learned from the charts repoLessons learned from the charts repo
Lessons learned from the charts repo
 
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
 
Helm at reddit: from local dev, staging, to production
Helm at reddit: from local dev, staging, to productionHelm at reddit: from local dev, staging, to production
Helm at reddit: from local dev, staging, to production
 
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
 
GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott Rigby
 
Kube cfg-mgmt
Kube cfg-mgmtKube cfg-mgmt
Kube cfg-mgmt
 
GitOps - Operation By Pull Request
GitOps - Operation By Pull RequestGitOps - Operation By Pull Request
GitOps - Operation By Pull Request
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
 
Microservices at Mercari
Microservices at MercariMicroservices at Mercari
Microservices at Mercari
 

Similar to From training to explainability via git ops

Why is dev ops for machine learning so different
Why is dev ops for machine learning so differentWhy is dev ops for machine learning so different
Why is dev ops for machine learning so differentRyan Dawson
 
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 IstioAnimesh Singh
 
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 MeetupJim Dowling
 
Splunk Ninjas: New Features, Pivot, and Search Dojo
Splunk Ninjas: New Features, Pivot, and Search DojoSplunk Ninjas: New Features, Pivot, and Search Dojo
Splunk Ninjas: New Features, Pivot, and Search DojoSplunk
 
Why is dev ops for machine learning so different - dataxdays
Why is dev ops for machine learning so different  - dataxdaysWhy is dev ops for machine learning so different  - dataxdays
Why is dev ops for machine learning so different - dataxdaysRyan Dawson
 
EPAM ML/AI Accelerator - ODAHU
EPAM ML/AI Accelerator - ODAHUEPAM ML/AI Accelerator - ODAHU
EPAM ML/AI Accelerator - ODAHUDmitrii Suslov
 
Data Summer Conf 2018, “Monitoring AI with AI (RUS)” — Stepan Pushkarev, CTO ...
Data Summer Conf 2018, “Monitoring AI with AI (RUS)” — Stepan Pushkarev, CTO ...Data Summer Conf 2018, “Monitoring AI with AI (RUS)” — Stepan Pushkarev, CTO ...
Data Summer Conf 2018, “Monitoring AI with AI (RUS)” — Stepan Pushkarev, CTO ...Provectus
 
Seamless MLOps with Seldon and MLflow
Seamless MLOps with Seldon and MLflowSeamless MLOps with Seldon and MLflow
Seamless MLOps with Seldon and MLflowDatabricks
 
Certification Study Group - NLP & Recommendation Systems on GCP Session 5
Certification Study Group - NLP & Recommendation Systems on GCP Session 5Certification Study Group - NLP & Recommendation Systems on GCP Session 5
Certification Study Group - NLP & Recommendation Systems on GCP Session 5gdgsurrey
 
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...Gabriel Moreira
 
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...Gabriel Moreira
 
Data Models Breakout Session
Data Models Breakout SessionData Models Breakout Session
Data Models Breakout SessionSplunk
 
Pitfalls of machine learning in production
Pitfalls of machine learning in productionPitfalls of machine learning in production
Pitfalls of machine learning in productionAntoine Sauray
 
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...HostedbyConfluent
 
Productionizing Machine Learning with a Microservices Architecture
Productionizing Machine Learning with a Microservices ArchitectureProductionizing Machine Learning with a Microservices Architecture
Productionizing Machine Learning with a Microservices ArchitectureDatabricks
 
"Deployment for free": removing the need to write model deployment code at St...
"Deployment for free": removing the need to write model deployment code at St..."Deployment for free": removing the need to write model deployment code at St...
"Deployment for free": removing the need to write model deployment code at St...Stefan Krawczyk
 
Data Science in the Elastic Stack
Data Science in the Elastic StackData Science in the Elastic Stack
Data Science in the Elastic StackRochelle Sonnenberg
 
DutchMLSchool 2022 - Automation
DutchMLSchool 2022 - AutomationDutchMLSchool 2022 - Automation
DutchMLSchool 2022 - AutomationBigML, Inc
 
Splunk Ninjas: New Features, Pivot, and Search Dojo
Splunk Ninjas: New Features, Pivot, and Search DojoSplunk Ninjas: New Features, Pivot, and Search Dojo
Splunk Ninjas: New Features, Pivot, and Search DojoSplunk
 

Similar to From training to explainability via git ops (20)

Why is dev ops for machine learning so different
Why is dev ops for machine learning so differentWhy is dev ops for machine learning so different
Why is dev ops for machine learning so different
 
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
 
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
 
Splunk Ninjas: New Features, Pivot, and Search Dojo
Splunk Ninjas: New Features, Pivot, and Search DojoSplunk Ninjas: New Features, Pivot, and Search Dojo
Splunk Ninjas: New Features, Pivot, and Search Dojo
 
Why is dev ops for machine learning so different - dataxdays
Why is dev ops for machine learning so different  - dataxdaysWhy is dev ops for machine learning so different  - dataxdays
Why is dev ops for machine learning so different - dataxdays
 
EPAM ML/AI Accelerator - ODAHU
EPAM ML/AI Accelerator - ODAHUEPAM ML/AI Accelerator - ODAHU
EPAM ML/AI Accelerator - ODAHU
 
Data Summer Conf 2018, “Monitoring AI with AI (RUS)” — Stepan Pushkarev, CTO ...
Data Summer Conf 2018, “Monitoring AI with AI (RUS)” — Stepan Pushkarev, CTO ...Data Summer Conf 2018, “Monitoring AI with AI (RUS)” — Stepan Pushkarev, CTO ...
Data Summer Conf 2018, “Monitoring AI with AI (RUS)” — Stepan Pushkarev, CTO ...
 
Monitoring AI with AI
Monitoring AI with AIMonitoring AI with AI
Monitoring AI with AI
 
Seamless MLOps with Seldon and MLflow
Seamless MLOps with Seldon and MLflowSeamless MLOps with Seldon and MLflow
Seamless MLOps with Seldon and MLflow
 
Certification Study Group - NLP & Recommendation Systems on GCP Session 5
Certification Study Group - NLP & Recommendation Systems on GCP Session 5Certification Study Group - NLP & Recommendation Systems on GCP Session 5
Certification Study Group - NLP & Recommendation Systems on GCP Session 5
 
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
 
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
PAPIs LATAM 2019 - Training and deploying ML models with Kubeflow and TensorF...
 
Data Models Breakout Session
Data Models Breakout SessionData Models Breakout Session
Data Models Breakout Session
 
Pitfalls of machine learning in production
Pitfalls of machine learning in productionPitfalls of machine learning in production
Pitfalls of machine learning in production
 
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
 
Productionizing Machine Learning with a Microservices Architecture
Productionizing Machine Learning with a Microservices ArchitectureProductionizing Machine Learning with a Microservices Architecture
Productionizing Machine Learning with a Microservices Architecture
 
"Deployment for free": removing the need to write model deployment code at St...
"Deployment for free": removing the need to write model deployment code at St..."Deployment for free": removing the need to write model deployment code at St...
"Deployment for free": removing the need to write model deployment code at St...
 
Data Science in the Elastic Stack
Data Science in the Elastic StackData Science in the Elastic Stack
Data Science in the Elastic Stack
 
DutchMLSchool 2022 - Automation
DutchMLSchool 2022 - AutomationDutchMLSchool 2022 - Automation
DutchMLSchool 2022 - Automation
 
Splunk Ninjas: New Features, Pivot, and Search Dojo
Splunk Ninjas: New Features, Pivot, and Search DojoSplunk Ninjas: New Features, Pivot, and Search Dojo
Splunk Ninjas: New Features, Pivot, and Search Dojo
 

More from Ryan Dawson

mlops.community meetup - ML Governance_ A Practical Guide.pptx
mlops.community meetup - ML Governance_ A Practical Guide.pptxmlops.community meetup - ML Governance_ A Practical Guide.pptx
mlops.community meetup - ML Governance_ A Practical Guide.pptxRyan Dawson
 
Conspiracy Theories in the Information Age
Conspiracy Theories in the Information AgeConspiracy Theories in the Information Age
Conspiracy Theories in the Information AgeRyan Dawson
 
Maximising teamwork in delivering software products
Maximising teamwork in delivering software productsMaximising teamwork in delivering software products
Maximising teamwork in delivering software productsRyan Dawson
 
Maximising teamwork in delivering software products
Maximising teamwork in delivering software products Maximising teamwork in delivering software products
Maximising teamwork in delivering software products Ryan Dawson
 
Java vs challenger languages
Java vs challenger languagesJava vs challenger languages
Java vs challenger languagesRyan Dawson
 
Challenges for AI in prod
Challenges for AI in prodChallenges for AI in prod
Challenges for AI in prodRyan Dawson
 
How open source is funded the enterprise differentiation tightrope (1)
How open source is funded  the enterprise differentiation tightrope (1)How open source is funded  the enterprise differentiation tightrope (1)
How open source is funded the enterprise differentiation tightrope (1)Ryan Dawson
 
From java monolith to kubernetes microservices - an open source journey with ...
From java monolith to kubernetes microservices - an open source journey with ...From java monolith to kubernetes microservices - an open source journey with ...
From java monolith to kubernetes microservices - an open source journey with ...Ryan Dawson
 
Whirlwind tour of activiti 7
Whirlwind tour of activiti 7Whirlwind tour of activiti 7
Whirlwind tour of activiti 7Ryan Dawson
 
Jdk.io cloud native business automation
Jdk.io cloud native business automationJdk.io cloud native business automation
Jdk.io cloud native business automationRyan Dawson
 
Identity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibilityIdentity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibilityRyan Dawson
 
Activiti Cloud Deep Dive
Activiti Cloud Deep DiveActiviti Cloud Deep Dive
Activiti Cloud Deep DiveRyan Dawson
 

More from Ryan Dawson (12)

mlops.community meetup - ML Governance_ A Practical Guide.pptx
mlops.community meetup - ML Governance_ A Practical Guide.pptxmlops.community meetup - ML Governance_ A Practical Guide.pptx
mlops.community meetup - ML Governance_ A Practical Guide.pptx
 
Conspiracy Theories in the Information Age
Conspiracy Theories in the Information AgeConspiracy Theories in the Information Age
Conspiracy Theories in the Information Age
 
Maximising teamwork in delivering software products
Maximising teamwork in delivering software productsMaximising teamwork in delivering software products
Maximising teamwork in delivering software products
 
Maximising teamwork in delivering software products
Maximising teamwork in delivering software products Maximising teamwork in delivering software products
Maximising teamwork in delivering software products
 
Java vs challenger languages
Java vs challenger languagesJava vs challenger languages
Java vs challenger languages
 
Challenges for AI in prod
Challenges for AI in prodChallenges for AI in prod
Challenges for AI in prod
 
How open source is funded the enterprise differentiation tightrope (1)
How open source is funded  the enterprise differentiation tightrope (1)How open source is funded  the enterprise differentiation tightrope (1)
How open source is funded the enterprise differentiation tightrope (1)
 
From java monolith to kubernetes microservices - an open source journey with ...
From java monolith to kubernetes microservices - an open source journey with ...From java monolith to kubernetes microservices - an open source journey with ...
From java monolith to kubernetes microservices - an open source journey with ...
 
Whirlwind tour of activiti 7
Whirlwind tour of activiti 7Whirlwind tour of activiti 7
Whirlwind tour of activiti 7
 
Jdk.io cloud native business automation
Jdk.io cloud native business automationJdk.io cloud native business automation
Jdk.io cloud native business automation
 
Identity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibilityIdentity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibility
 
Activiti Cloud Deep Dive
Activiti Cloud Deep DiveActiviti Cloud Deep Dive
Activiti Cloud Deep Dive
 

Recently uploaded

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
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
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
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.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 

Recently uploaded (20)

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
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...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
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
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 

From training to explainability via git ops

  • 1. From Training to Explainability via GitOps Kubeflow Contributor Summit October 2019
  • 2. Outline - Background: What Customers want from Kubeflow - Time to value - Governance - How best to get to live predictions? - GitOps - why and how - Pipeline to serving walkthrough with - Oversight - Observability - Explainability
  • 3. What Customers want from an ML Platform Empowerment/Time to value ● Self-service for data science ● DS & Ops collaboration ● Sandboxing ● Repeatable approaches Governance ● Visibility and oversight of running models ● Detailed monitoring ● Audit trails ● Access control ● Repeatable approaches ● Explainability Kubeflow ticks these boxes!
  • 4. Kubeflow for Collaboration - Jupyter - Collaboration - Sandboxing (inc fairing) - Share repeatable approaches - Pipelines - Data science and Ops collaboration - Repeatable approaches - Audit Trails (governance)
  • 5. Kubeflow for Governance - Metadata/Artifact Management - Track what produced when and how - Multi User Isolation - Control who can do what
  • 6. Path to Live Serving Those features aimed at exploration and training Multiple paths to serving (live predictions) with kubeflow. How best to get from training to serving? How do we get to serving with empowerment and governance?
  • 7. GitOps for Live Serving ● Cluster state represented declaratively ● ArgoCD/Flux/Jenkins-X ● Audit trails and reverts ● Git permissions ● Favourite with Ops Ok to push to cluster for sandboxing. GitOps great option for prod… but how best to do it?
  • 9. The scenario ● Classify income (as high or low) based on US Census features incl. age, gender, race, marital status ● Train a scikit-learn classifier ● Deploy from kubeflow pipeline via GitOps ● Serve requests with Seldon ● Deploy alibi explainer and explain predictions
  • 10. Build Model - Model is income classifier - Build alibi explainer together with model # train an RF model np.random.seed(0) clf = RandomForestClassifier(n_estimators=50) #clf.fit(preprocessor.transform(X_train), Y_train) pipeline = Pipeline([('preprocessor', preprocessor), ('clf', clf)]) pipeline.fit(X_train, Y_train) print(X_train.shape) print(pipeline.predict(X_train[0:1])) print("Creating an explainer") predict_fn = lambda x: pipeline.predict_proba(x) predict_fn(X_train[0:1]) predict_fn(np.zeros([1, len(feature_names)])) explainer = alibi.explainers.AnchorTabular(predict_fn=predict_fn, feature_names=feature_names, categorical_names=category_map) explainer.fit(X_train) explainer.predict_fn = None # Clear explainer predict_fn as its a lambda and will be reset when loaded with open("explainer.dill", 'wb') as f: dill.dump(explainer,f)
  • 11. Seldon GitOps Serving apiVersion: machinelearning.seldon.io/v1alpha2 kind: SeldonDeployment metadata: name: sklearn spec: name: iris predictors: - graph: children: [] implementation: SKLEARN_SERVER modelUri: gs://seldon-models/sklearn/iris name: classifier name: default replicas: 1 Model in storage bucket Manifest in Git KFServing too
  • 13. GitOps from Pipeline @dsl.pipeline( name="Serving gitops", description="Example of pushing to git from pipeline" ) #Example to show how serving yaml can be pushed to git def serve_gitops(user='ryandawsonuk',email='rd@seldon.io',git_token='xxxxxxxxxx',file='https://raw.githubusercontent.com/ryandawsonuk/seldon_gitop s_repo_old1/master/default/SeldonDeployment-income-classifier2.json',filename='SeldonDeployment-income-classifier2.json'): #push file to serving repo push = dsl.ContainerOp( name="push", image="alpine/git:latest", command=["sh", "-c"], arguments=["git config --global url.'https://"+str(git_token)+":@github.com/'.insteadOf 'https://github.com/'; wget "+str(file)+"; git config --global user.name '"+str(user)+"'; git config --global user.email "+str(email)+"; git clone https://github.com/"+str(user)+"/seldon- gitops; ls; cp "+str(filename)+" ./seldon-gitops/default/"+str(filename)+"; cd ./seldon-gitops/; git add .; git commit -m 'add "+str(filename)+"'; git push -u origin master;"] )
  • 14. GitOps for Serving ● Great for Data Science and Ops Collaboration
  • 16. Observability Now we know what’s running… So what is it doing?
  • 19. Sidenote: Access Control Can’t have metrics without requests Access from curl or Seldon UI predict/load-test If you don’t have an existing auth preference we like...
  • 20. Explainability So now we know what it’s doing… Why is it doing that?
  • 21. Request Logging To ask why, need to first know what happened
  • 22. Explainer Deployment apiVersion: machinelearning.seldon.io/v1alpha2 kind: SeldonDeployment metadata: name: income spec: name: income predictors: - graph: children: [] implementation: SKLEARN_SERVER modelUri: gs://seldon-models/sklearn/income/model name: classifier explainer: type: anchor_tabular modelUri: gs://seldon-models/sklearn/income/explainer name: default replicas: 1 Declarative yaml Wizards for time to value & sandboxing
  • 23. Alibi Explainers - Includes techniques for black-box models - We’ll use anchors for tabular data - Anchors are sufficient conditions to ensure a certain prediction - As long as the anchor holds, the prediction should remain the same regardless of the values of the other features - Anchors are chosen to maximise the range for which the prediction holds
  • 26. Wrap-up ● What Seldon Customers want ○ Time to value ○ Governance ● GitOps helps with both ● Pipeline to serving walkthrough with ○ Oversight ○ Observability ○ Explainability
  • 27. The Future Very excited about: ● Metadata integrations ● Permissions ● KFServing and MLGraph