"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;
Showing posts with label KFServing. Show all posts
Showing posts with label KFServing. Show all posts

August 19, 2020

Research paper read - Serverless inferencing on Kubernetes

Serverless inferencing on Kubernetes

Key Notes
  • KNative serverless paradigm to provide a serverless machine learning inference solution
  • Frameworks - MLFlow, Kubeflow
Deployment / Inference Challenges
  • Handling multiple machine learning frameworks in a consistent manner.
  • Updating running models with new versions.
  • Scaling models appropriately with constraints.
  • Monitoring models.
  • Canaries allow users to split a small percentage of traffic to their new model
KFServing
  • KFServing is a project that was created within the Kubeflow
  • Transformers allow focused data transformations of the request and response from the model

Example #1 
Provide Inference Location
  • Create a storage initializer to download the artifacts from any popular storage (Google Storage, Amazon S3, Azure, local disk) and load onto the server.
  • Wire up networking so an endpoint is made available for inference requests
Example #2
Canary Location

Monitoring and explainability of models in production
Success Metrics for ML Model
1. Monitoring model performance
2. Monitoring metrics related to incoming data
3. Detecting outliers and drift
4. Explaining model predictions

Key aspects
Monitoring system requires functionality to determine when significant changes to data and predictive distributions happen

Seldon Core provides a dedicated /send-feedback API endpoint accepting labels and performing user-defined metric calculations

Drift Detector - The goal of the drift detector is therefore to identify when the distribution of the requests for the deployed model starts to diverge from the training data and model predictions

Model Monitoring - a KNative broker which can farm these out as desired via programmable triggers to serverless components such as outlier, drift and adversarial detection

More Reads - Minio - High performance object storage

Keep Thinking!!!

July 26, 2020

Weekend Learning - Introducing KFServing: Serverless Model Serving on Kubernetes



KF Serving
  • Serving story for Kubeflow
  • The concepts behind Kubernetes
  • Serving Frameworks (Seldon core, ml lambdas, Tensorflow Serving)
  • Consistent interfaces for different frameworks
  • ServiceAccount for access
  • Canary - 2 way split (New / Old)
  • Default Standard Deployment
  • Canary - Addressable primary / default
  • Experimental traffic handling
  • Similar to A / B Testing
  • KFServing for ML Problems
  • Knative - Resource Model
  • Production Features of ML KFServing 0.2
  • Use cases at Bloomberg
  • Serving models in production
  • Scaling and handling traffic
  • End to End implementation/scalability and load handling
  • Model production requirements
  • A lot of out of box features for production-grade implementation

  • Bloombergs use cases
  • All data / NLP
KF Serving Transformer concept
  • Implement pre and post processing
  • Add transformer to inference service



Model Explanation
  • Alibi library
  • Accessibility to prediction URL
Kafka Implementation Example
A / B Testing Approach
CI / CD Pipeline


MNIST kfserving
  • Preprocess / postprocess in transformer
  • Download image
  • Run prediction
  • Result upload to bucket
  • Custom model to process
  • Upload to bucket
More Reads
Link1
Sample for KFServing SDK with a custom image
Predict on a InferenceService using Tensorflow

Happy Learning!!!